You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "Patson Luk (Jira)" <ji...@apache.org> on 2023/03/14 21:04:00 UTC

[jira] [Created] (SOLR-16701) Fetching PRS enabled collection might throw SolrException: Error fetching per-replica-states if the collection is deleted during the fetch

Patson Luk created SOLR-16701:
---------------------------------

             Summary: Fetching PRS enabled collection might throw SolrException: Error fetching per-replica-states if the collection is deleted during the fetch
                 Key: SOLR-16701
                 URL: https://issues.apache.org/jira/browse/SOLR-16701
             Project: Solr
          Issue Type: Bug
      Security Level: Public (Default Security Level. Issues are Public)
          Components: SolrCloud
    Affects Versions: main (10.0)
            Reporter: Patson Luk


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)}}}}
{{{{at app//org.apache.solr.common.cloud.ZkStateReader.getCollectionLive(ZkStateReader.java:1672)}}}}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org