Jackie-Jiang opened a new pull request, #20006: URL: https://github.com/apache/pinot/pull/20006
## Summary Strict replica-group routing routes every segment that shares the same instances in the ideal state to the same instance. That only gives partition level consistency when the segment assignment keeps all segments of a partition on exactly one instance per replica-group, which is what upsert and dedup tables rely on and what a table that opts into `strictReplicaGroup` routing expects. Nothing validated that today: the upsert and dedup validation only rejected tag overrides and `instanceAssignmentConfigMap.COMPLETED` on REALTIME tables, and an OFFLINE table could pair strict routing with any instance assignment. This PR makes the requirement explicit and validates it in one place, `validateStrictReplicaGroupRouting`, for tables using `strictReplicaGroup` routing and for upsert and dedup tables regardless of their instance selector. Dimension tables are exempt, since every server hosts every segment. - OFFLINE: the OFFLINE instance assignment must be replica-group based with `numInstancesPerPartition` of 1, and the OFFLINE segment assignment strategy, if configured, must be `replicagroup`, since the other strategies ignore the partition. The instance assignment may still come from the deprecated `replicaGroupStrategyConfig`, which takes effect only together with the `replicagroup` strategy. The partition column of a partitioned instance assignment is covered by the existing `validatePartitionedSegmentAssignment`. - REALTIME: CONSUMING segments are placed by their stream partition, which keeps each partition on one instance per replica-group when the CONSUMING instance partitions have a single partition or one instance per partition, so a partitioned CONSUMING instance assignment must have `numInstancesPerPartition` of 1. COMPLETED segments must not be relocated, whether through a tag override with a different `realtimeCompleted` tag, `instanceAssignmentConfigMap.COMPLETED` or `instancePartitionsMap.COMPLETED`. This replaces the `instanceAssignmentConfigMap.COMPLETED` check in the upsert and dedup validation and extends it to pre-configured COMPLETED instance partitions. Upsert and dedup tables still reject any tenant tag override, as before. - Pre-configured instance partitions are not visible in the table config, so the controller validates the computed or fetched ones: the OFFLINE instance partitions, and the CONSUMING ones when they have multiple partitions, must have exactly one instance per partition in each replica-group. ## Compatibility A table using `strictReplicaGroup` routing without the matching segment assignment, or an upsert or dedup table relocating COMPLETED segments through pre-configured instance partitions, fails validation on its next update. Such tables route queries by partition while placing segments by something else, so the strict routing was not giving them the consistency it promises. 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
