HoustonPutman commented on code in PR #2432:
URL: https://github.com/apache/solr/pull/2432#discussion_r1588046237
##########
solr/core/src/java/org/apache/solr/cloud/ZkController.java:
##########
@@ -2849,9 +2834,14 @@ public boolean
checkIfCoreNodeNameAlreadyExists(CoreDescriptor dcore) {
* Best effort to set DOWN state for all replicas on node.
*
* @param nodeName to operate on
+ * @return the names of the collections that have replicas on the given node
*/
- public void publishNodeAsDown(String nodeName) {
+ public Collection<String> publishNodeAsDown(String nodeName) {
log.info("Publish node={} as DOWN", nodeName);
+
+ ClusterState clusterState = cc.getZkController().getClusterState();
+ Map<String, List<Replica>> replicasPerCollectionOnNode =
+ clusterState.getReplicaNamesPerCollectionOnNode(nodeName);
Review Comment:
So it should be mentioned that this is only really a problem because of PRS.
In order to determine if a collection needs to be managed by the node itself,
we have to load the collection and check if it is PRS enabled. If the overseer
could handle the updates for PRS, it would be much less of a strain.
As for the initial issue that the node doesn't know which collections to
watch, we could have the overseer somehow give that information back to the
node to tell it which collections to watch for state.
--
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]