Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
main (10.0)
-
None
-
None
Description
It's found that a race condition could arise and trigger SolrException, if:
1. `fetchCollectionState` is called, and the state.json is fetched
2. But before the `fetchCollectionState` fetches the PRS entries, the collection state.json/PRS are deleted by someone else
3. `fetchCollectionState` would throw below exception when it reaches the PRS fetching logic
org.apache.solr.common.SolrException: Error fetching per-replica states
at __randomizedtesting.SeedInfo.seed([C2BFFBF8FE49C1E1:F1C8D9E308D2745]:0)
at app//org.apache.solr.common.cloud.PerReplicaStatesFetcher.fetch(PerReplicaStatesFetcher.java:49)
at app//org.apache.solr.common.cloud.PerReplicaStatesFetcher$LazyPrsSupplier.lambda$new$0(PerReplicaStatesFetcher.java:62)
at app//org.apache.solr.common.cloud.DocCollection$PrsSupplier.get(DocCollection.java:515)
at app//org.apache.solr.common.cloud.Replica.isLeader(Replica.java:314)
at app//org.apache.solr.common.cloud.Slice.findLeader(Slice.java:242)
at app//org.apache.solr.common.cloud.Slice.setPrsSupplier(Slice.java:56)
at app//org.apache.solr.common.cloud.DocCollection.<init>(DocCollection.java:123)
at app//org.apache.solr.common.cloud.ClusterState.collectionFromObjects(ClusterState.java:305)
at app//org.apache.solr.common.cloud.ClusterState.createFromCollectionMap(ClusterState.java:254)
at app//org.apache.solr.client.solrj.impl.ZkClientClusterStateProvider.createFromJsonSupportingLegacyConfigName(ZkClientClusterStateProvider.java:117)
at app//org.apache.solr.common.cloud.ZkStateReader.fetchCollectionState(ZkStateReader.java:1695)
Attachments
Issue Links
- links to