gortiz opened a new pull request, #19878: URL: https://github.com/apache/pinot/pull/19878
## Summary Follow-up to #19785, part of #19782. This PR applies the review suggestions from #19785. It adds two comments and one test case. It does not change behavior. ## Changes - `BaseInstanceSelector.InstanceStateMaps.equals()` compares the instance state maps by content, so maps with the same entries in a different iteration order share one canonical instance. A comment now states why this is correct: every candidate list is built in the order of `sortByKeyIfNeeded()`, which does not depend on the iteration order of the maps. - `ReplicaGroupInstanceSelector.updateSegmentMapsForUpsertTable()` caches the old segment candidates per `InstanceStateMaps`. The candidates also depend on the unavailable instances, which are keyed by the instances of the ideal state. The comment now states that segments that share one `InstanceStateMaps` have equal ideal state maps, thus the same unavailable instances. - `InstanceSelectorTest.testSharedCandidateListsMatchPerSegmentLists` also runs the replica-group selector on an upsert table. That selector then applies the strict replica-group rules through `updateSegmentMapsForUpsertTable()`. The strict replica-group selector already used this path in the test. ## Tests `InstanceSelectorTest`, `ReplicaGroupSelectorTest` and `MultiStageReplicaGroupSelectorTest` run 117 tests with 0 failures. -- 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]
