mirror of https://github.com/apache/lucene.git
SOLR-9029: fix rare ZkStateReader visibility race during collection state format update
This commit is contained in:
parent
922265b478
commit
89c65af2a6
|
@ -150,6 +150,8 @@ Bug Fixes
|
|||
|
||||
* SOLR-8992: Restore Schema API GET method functionality removed in 6.0 (noble, Steve Rowe)
|
||||
|
||||
* SOLR-9029: fix rare ZkStateReader visibility race during collection state format update (Scott Blum, hossman)
|
||||
|
||||
Optimizations
|
||||
----------------------
|
||||
* SOLR-8722: Don't force a full ZkStateReader refresh on every Overseer operation.
|
||||
|
|
|
@ -263,9 +263,9 @@ public class ZkStateReader implements Closeable {
|
|||
}
|
||||
|
||||
ClusterState.CollectionRef ref = clusterState.getCollectionRef(collection);
|
||||
if (ref == null) {
|
||||
// We don't know anything about this collection, maybe it's new?
|
||||
// First try to update the legacy cluster state.
|
||||
if (ref == null || legacyCollectionStates.containsKey(collection)) {
|
||||
// We either don't know anything about this collection (maybe it's new?) or it's legacy.
|
||||
// First update the legacy cluster state.
|
||||
refreshLegacyClusterState(null);
|
||||
if (!legacyCollectionStates.containsKey(collection)) {
|
||||
// No dice, see if a new collection just got created.
|
||||
|
@ -283,9 +283,6 @@ public class ZkStateReader implements Closeable {
|
|||
}
|
||||
// Edge case: if there's no external collection, try refreshing legacy cluster state in case it's there.
|
||||
refreshLegacyClusterState(null);
|
||||
} else if (legacyCollectionStates.containsKey(collection)) {
|
||||
// Exists, and lives in legacy cluster state, force a refresh.
|
||||
refreshLegacyClusterState(null);
|
||||
} else if (watchedCollectionStates.containsKey(collection)) {
|
||||
// Exists as a watched collection, force a refresh.
|
||||
DocCollection newState = fetchCollectionState(collection, null);
|
||||
|
|
Loading…
Reference in New Issue