Description
Reading cluster state information using /collections?action=CLUSTERSTATUS can fail if there's a concurrent /collections?action=DELETE operation.
The code in ClusterStatus.getClusterStatus
- gets collection names
- for every collection reads its cluster state info using ClusterState.getCollection
The problem is that if there's a DELETE operation in between then ClusterState.getCollection can fail thus causing the whole operation to fail. It seems that it would be better to call ClusterState.getCollectionOrNull and skip/ignore that collection if the result is null.
19:49:32.479 [qtp1531448569-881] ERROR org.apache.solr.core.SolrCore - org.apache.solr.common.SolrException: Could not find collection : collection at org.apache.solr.common.cloud.ClusterState.getCollection(ClusterState.java:165) at org.apache.solr.handler.admin.ClusterStatus.getClusterStatus(ClusterStatus.java:110) at org.apache.solr.handler.admin.CollectionsHandler$CollectionOperation$19.call(CollectionsHandler.java:614) at org.apache.solr.handler.admin.CollectionsHandler.handleRequestBody(CollectionsHandler.java:166)
Attachments
Attachments
Issue Links
- is related to
-
SOLR-9471 Another race condition in ClusterStatus.getClusterStatus
- Resolved