pre-configuration based assignment#11578
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #11578 +/- ##
============================================
- Coverage 63.20% 61.45% -1.75%
- Complexity 1141 1147 +6
============================================
Files 2343 2376 +33
Lines 126343 128744 +2401
Branches 19439 19899 +460
============================================
- Hits 79854 79122 -732
- Misses 40821 43898 +3077
- Partials 5668 5724 +56
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
b52d864 to
4d822e8
Compare
4d822e8 to
745e6b0
Compare
|
What is the difference between this and #8989? |
add tenant partition map rest resource fix logic refactor and fix some logic pre-configuration based assignment
745e6b0 to
60877d1
Compare
|
Do you have a design doc for this? Trying to understand what we want to achieve in this PR |
vvivekiyer
left a comment
There was a problem hiding this comment.
Flushing out partial comments. I'll review the rest of the files meanwhile.
...spi/src/main/java/org/apache/pinot/spi/config/table/assignment/InstanceAssignmentConfig.java
Outdated
Show resolved
Hide resolved
pinot-core/src/main/java/org/apache/pinot/core/auth/Actions.java
Outdated
Show resolved
Hide resolved
...ller/src/main/java/org/apache/pinot/controller/api/resources/PinotTenantRestletResource.java
Outdated
Show resolved
Hide resolved
...ller/src/main/java/org/apache/pinot/controller/api/resources/PinotTenantRestletResource.java
Show resolved
Hide resolved
...ller/src/main/java/org/apache/pinot/controller/api/resources/PinotTenantRestletResource.java
Outdated
Show resolved
Hide resolved
...ller/src/main/java/org/apache/pinot/controller/api/resources/PinotTenantRestletResource.java
Show resolved
Hide resolved
...ller/src/main/java/org/apache/pinot/controller/api/resources/PinotTenantRestletResource.java
Outdated
Show resolved
Hide resolved
...n/java/org/apache/pinot/controller/api/resources/PinotInstanceAssignmentRestletResource.java
Show resolved
Hide resolved
...n/java/org/apache/pinot/controller/api/resources/PinotInstanceAssignmentRestletResource.java
Outdated
Show resolved
Hide resolved
Let's meet to share our context on where we are coming from and the overall goal here. We will setup a meeting |
|
@jasperjiaguo Capturing our offline discussion here: The configuration for enabling this feature works as follows:
There seems to be a few things we can simplify here:
(or) (2) If we need this extra detail, we should probably avoid overloading the already existing @jasperjiaguo is going to look at the possibility for this. If the change is non-trivial, it's better left as a TODO. |
.../pinot/controller/helix/core/assignment/instance/PreConfiguredInstancePartitionSelector.java
Outdated
Show resolved
Hide resolved
.../pinot/controller/helix/core/assignment/instance/PreConfiguredInstancePartitionSelector.java
Outdated
Show resolved
Hide resolved
.../pinot/controller/helix/core/assignment/instance/PreConfiguredInstancePartitionSelector.java
Outdated
Show resolved
Hide resolved
.../pinot/controller/helix/core/assignment/instance/PreConfiguredInstancePartitionSelector.java
Outdated
Show resolved
Hide resolved
.../pinot/controller/helix/core/assignment/instance/PreConfiguredInstancePartitionSelector.java
Outdated
Show resolved
Hide resolved
...t-common/src/main/java/org/apache/pinot/common/assignment/InstanceAssignmentConfigUtils.java
Outdated
Show resolved
Hide resolved
...ller/src/main/java/org/apache/pinot/controller/api/resources/PinotTenantRestletResource.java
Show resolved
Hide resolved
...ller/src/main/java/org/apache/pinot/controller/api/resources/PinotTenantRestletResource.java
Outdated
Show resolved
Hide resolved
...inot/controller/helix/core/assignment/instance/MirrorServerSetInstancePartitionSelector.java
Show resolved
Hide resolved
...inot/controller/helix/core/assignment/instance/MirrorServerSetInstancePartitionSelector.java
Show resolved
Hide resolved
...inot/controller/helix/core/assignment/instance/MirrorServerSetInstancePartitionSelector.java
Outdated
Show resolved
Hide resolved
...inot/controller/helix/core/assignment/instance/MirrorServerSetInstancePartitionSelector.java
Outdated
Show resolved
Hide resolved
...inot/controller/helix/core/assignment/instance/MirrorServerSetInstancePartitionSelector.java
Outdated
Show resolved
Hide resolved
...inot/controller/helix/core/assignment/instance/MirrorServerSetInstancePartitionSelector.java
Show resolved
Hide resolved
...inot/controller/helix/core/assignment/instance/MirrorServerSetInstancePartitionSelector.java
Outdated
Show resolved
Hide resolved
208b079 to
367af71
Compare
...ntroller/src/main/java/org/apache/pinot/controller/helix/core/PinotHelixResourceManager.java
Outdated
Show resolved
Hide resolved
somandal
left a comment
There was a problem hiding this comment.
thanks for the detailed tests!
| assignmentConfig, instanceConfigs, existingInstancePartitions, null); | ||
| } | ||
|
|
||
| public InstancePartitions assignInstances(InstancePartitionsType instancePartitionsType, |
There was a problem hiding this comment.
nit: can the existing assignInstances(InstancePartitionsType instancePartitionsType, List<InstanceConfig> instanceConfigs, @Nullable InstancePartitions existingInstancePartitions) call this function since the remaining setup is the same? just to avoid too much code duplication
...ller/src/main/java/org/apache/pinot/controller/api/resources/PinotTenantRestletResource.java
Show resolved
Hide resolved
|
this PR broken ColocatedJoinQuickStart can we take a look CC @jasperjiaguo @siddharthteotia |
walterddr
left a comment
There was a problem hiding this comment.
FYI error:
2023/10/31 12:27:38.097 ERROR [TableConfigsRestletResource] [grizzly-http-server-10] null
java.lang.NullPointerException: null
at org.apache.pinot.common.assignment.InstanceAssignmentConfigUtils.isMirrorServerSetAssignment(InstanceAssignmentConfigUtils.java:132) ~[classes/:?]
at org.apache.pinot.controller.helix.core.PinotHelixResourceManager.assignInstances(PinotHelixResourceManager.java:1757) ~[classes/:?]
at org.apache.pinot.controller.helix.core.PinotHelixResourceManager.addTable(PinotHelixResourceManager.java:1595) ~[classes/:?]
at org.apache.pinot.controller.api.resources.TableConfigsRestletResource.addConfig(TableConfigsRestletResource.java:227) ~[classes/:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory.lambda$static$0(ResourceMethodInvocationHandlerFactory.java:52) ~[jersey-server-2.39.jar:?]
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:134) [jersey-server-2.39.jar:?]
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:177) [jersey-server-2.39.jar:?]
at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$TypeOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:219) [jersey-server-2.39.jar:?]
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:81) [jersey-server-2.39.jar:?]
at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:478) [jersey-server-2.39.jar:?]
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:400) [jersey-server-2.39.jar:?]
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:81) [jersey-server-2.39.jar:?]
at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:256) [jersey-server-2.39.jar:?]
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:248) [jersey-common-2.39.jar:?]
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:244) [jersey-common-2.39.jar:?]
at org.glassfish.jersey.internal.Errors.process(Errors.java:292) [jersey-common-2.39.jar:?]
at org.glassfish.jersey.internal.Errors.process(Errors.java:274) [jersey-common-2.39.jar:?]
at org.glassfish.jersey.internal.Errors.process(Errors.java:244) [jersey-common-2.39.jar:?]
at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:265) [jersey-common-2.39.jar:?]
at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:235) [jersey-server-2.39.jar:?]
at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:684) [jersey-server-2.39.jar:?]
at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:356) [jersey-container-grizzly2-http-2.39.jar:?]
at org.glassfish.grizzly.http.server.HttpHandler$1.run(HttpHandler.java:200) [grizzly-http-server-2.4.4.jar:2.4.4]
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:569) [grizzly-framework-2.4.4.jar:2.4.4]
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:549) [grizzly-framework-2.4.4.jar:2.4.4]
at java.lang.Thread.run(Thread.java:829) [?:?]
2023/10/31 12:27:38.105 INFO [AddTableCommand] [main] {"code":500,"error":null}
java.lang.RuntimeException: Unable to create offline table - userGroups from schema file [/var/folders/bq/f8s34x8163v0609ry22yqkf40000gn/T/1698780410918/userGroups/userGroups_schema.json] and table conf file [/var/folders/bq/f8s34x8163v0609ry22yqkf40000gn/T/1698780410918/userGroups/userGroups_offline_table_config.json].
at org.apache.pinot.tools.BootstrapTableTool.bootstrapOfflineTable(BootstrapTableTool.java:191)
at org.apache.pinot.tools.BootstrapTableTool.execute(BootstrapTableTool.java:104)
at org.apache.pinot.tools.admin.command.QuickstartRunner.bootstrapTable(QuickstartRunner.java:232)
at org.apache.pinot.tools.Quickstart.execute(Quickstart.java:85)
at org.apache.pinot.tools.admin.command.QuickStartCommand.execute(QuickStartCommand.java:178)
|
should be fixed by #11915 |
Thanks for the fix! |
https://docs.google.com/document/d/1xxPkGPxyY21gAkFi9gtFDeSzEXjPjp-IQW70kHynsL8/edit#heading=h.nit8xkm24pdw
Assign instances based on a pre-configured instance assignment map. The assignment will always respect the mirrored servers in the pre-configured map. E.g.
In the above assignment, the mirrored servers (row) in the pre-configured partitioning will always be respected when converging the existing assignment to the final assignment, meanwhile, we preserve the existing assignment as much as we can in this process.
Tested using randomized testing scheme with 10000000 iterations. No errors.