murblanc commented on a change in pull request #2199:
URL: https://github.com/apache/lucene-solr/pull/2199#discussion_r559768110
##########
File path:
solr/core/src/java/org/apache/solr/cluster/placement/plugins/AffinityPlacementFactory.java
##########
@@ -238,11 +247,87 @@ public PlacementPlan computePlacement(Cluster cluster,
PlacementRequest request,
// failure. Current code does fail if placement is impossible
(constraint is at most one replica of a shard on any node).
for (Replica.ReplicaType replicaType : Replica.ReplicaType.values()) {
makePlacementDecisions(solrCollection, shardName, availabilityZones,
replicaType, request.getCountReplicasToCreate(replicaType),
- attrValues, replicaTypeToNodes, nodesWithReplicas, coresOnNodes,
placementPlanFactory, replicaPlacements);
+ attrValues, replicaTypeToNodes, nodesWithReplicas, coresOnNodes,
placementContext.getPlacementPlanFactory(), replicaPlacements);
}
}
- return placementPlanFactory.createPlacementPlan(request,
replicaPlacements);
+ return
placementContext.getPlacementPlanFactory().createPlacementPlan(request,
replicaPlacements);
+ }
+
+ @Override
+ public void verifyAllowedModification(ModificationRequest
modificationRequest, PlacementContext placementContext) throws
PlacementModificationException, InterruptedException {
Review comment:
This method should be factored out and cut into a few pieces with
meaningful names to make reading easier.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]