Jackie-Jiang commented on code in PR #8483:
URL: https://github.com/apache/pinot/pull/8483#discussion_r847627440
##########
pinot-common/src/main/java/org/apache/pinot/common/assignment/InstancePartitions.java:
##########
@@ -58,24 +60,39 @@
@JsonIgnoreProperties(ignoreUnknown = true)
public class InstancePartitions {
private static final char PARTITION_REPLICA_GROUP_SEPARATOR = '_';
+ private static final String POOLS_KEY = "pools";
+ private static final String REPLICA_GROUP_SEPARATOR = "/";
private final String _instancePartitionsName;
+ // A map to store the partition and its associated list of instances.
+ // The partition key would be like "0_0", where the 1st number denotes the
partition id,
+ // and the 2nd one denotes the replica group id.
private final Map<String, List<String>> _partitionToInstancesMap;
+ // A map to store the selected pool numbers and their associated list of
replica groups.
+ private final Map<Integer, List<Integer>> _poolToReplicaGroupsMap;
Review Comment:
> The purpose of having this map here is due to the concern that some
instance from one pool may get assigned to another pool, even though the
chances could be small.
I don't think this can solve the problem though. I can see this map could
potentially be used when the total number of pools change, but it is still not
flexible. Since the chances are very small, I don't think it is worth solving.
If we really want to solve it, we should solve it in a more general way (see
point 3 above)
--
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]