[ https://issues.apache.org/jira/browse/SOLR-16701?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17768189#comment-17768189 ]
ASF subversion and git services commented on SOLR-16701: -------------------------------------------------------- Commit f1ba2c2cb8050ad958326141d86e573a28ab0516 in solr's branch refs/heads/branch_9x from patsonluk [ https://gitbox.apache.org/repos/asf?p=solr.git;h=f1ba2c2cb80 ] SOLR-16701: Race condition on PRS enabled collection deletion (#1460) (cherry picked from commit f22a51cc64f83f7b1268d9f3a4c50e36249bdd87) > 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 > Components: SolrCloud > Affects Versions: main (10.0) > Reporter: Patson Luk > Priority: Major > Time Spent: 1h > Remaining Estimate: 0h > > 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)}} -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org