murblanc commented on a change in pull request #2199:
URL: https://github.com/apache/lucene-solr/pull/2199#discussion_r559749942
##########
File path:
solr/core/src/java/org/apache/solr/cloud/api/collections/DeleteReplicaCmd.java
##########
@@ -147,14 +170,27 @@ void deleteReplicaBasedOnCount(ClusterState clusterState,
}
}
+ if (placementPlugin != null) {
Review comment:
By adding `if (placementPlugin != null)` logic in the `*Cmd` classes, we
are breaking the encapsulation that placement logic is handled by
`Assign.AssignStrategy`.
The only reason `*Cmd` code currently (before this PR) is even aware of the
notion of `PlacementPlugin` is because `PlacementPluginAssignStrategy`
configuration (rather than `LegacyAssignStrategy`) is dependent on a plugin
being defined...
I suggest to move all `*Cmd` vetting logic to `Assign.AssignStrategy`, so
that `*Cmd` only need to pass the instance of `PlacementPlugin` to that code
(and later when we finally decide how clusters are configured this will go
away, and we keep `*Cmd` clean of any specific assign strategy behavior).
In `Assign.AssignStrategy` the default vetting logic will be "accept all"
and in `PlacementPluginAssignStrategy` we can implement the checks we like.
----------------------------------------------------------------
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]