mirror of
https://github.com/apache/lucene.git
synced 2025-02-09 11:35:14 +00:00
SOLR-6591: Ignore overseer operations for collections with stateFormat > 1 if the parent ZK path doesn't exist
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1636400 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
06510acbab
commit
2e0eea7346
@ -382,6 +382,20 @@ public class Overseer implements Closeable {
|
|||||||
zkClient.setData(e.getKey(), data, true);
|
zkClient.setData(e.getKey(), data, true);
|
||||||
} else {
|
} else {
|
||||||
log.info("going to create_collection {}", e.getKey());
|
log.info("going to create_collection {}", e.getKey());
|
||||||
|
String parentPath = e.getKey().substring(0, e.getKey().lastIndexOf('/'));
|
||||||
|
if (!zkClient.exists(parentPath, true)) {
|
||||||
|
// if the /collections/collection_name path doesn't exist then it means that
|
||||||
|
// 1) the user invoked a DELETE collection API and the OverseerCollectionProcessor has deleted
|
||||||
|
// this zk path.
|
||||||
|
// 2) these are most likely old "state" messages which are only being processed now because
|
||||||
|
// if they were new "state" messages then in legacy mode, a new collection would have been
|
||||||
|
// created with stateFormat = 1 (which is the default state format)
|
||||||
|
// 3) these can't be new "state" messages created for a new collection because
|
||||||
|
// otherwise the OverseerCollectionProcessor would have already created this path
|
||||||
|
// as part of the create collection API call -- which is the only way in which a collection
|
||||||
|
// with stateFormat > 1 can possibly be created
|
||||||
|
continue;
|
||||||
|
}
|
||||||
zkClient.create(e.getKey(), data, CreateMode.PERSISTENT, true);
|
zkClient.create(e.getKey(), data, CreateMode.PERSISTENT, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user