mirror of https://github.com/apache/lucene.git
SOLR-8203: reject updates if core container is shutting down
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1712034 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
07202b9a42
commit
368d19a2b9
|
@ -1443,6 +1443,14 @@ public class DistributedUpdateProcessor extends UpdateRequestProcessor {
|
|||
}
|
||||
|
||||
private void zkCheck() {
|
||||
|
||||
// Streaming updates can delay shutdown and cause big update reorderings (new streams can't be
|
||||
// initiated, but existing streams carry on). This is why we check if the CC is shutdown.
|
||||
// See SOLR-8203 and loop HdfsChaosMonkeyNothingIsSafeTest (and check for inconsistent shards) to test.
|
||||
if (req.getCore().getCoreDescriptor().getCoreContainer().isShutDown()) {
|
||||
throw new SolrException(ErrorCode.SERVICE_UNAVAILABLE, "CoreContainer is shutting down.");
|
||||
}
|
||||
|
||||
if ((updateCommand.getFlags() & (UpdateCommand.REPLAY | UpdateCommand.PEER_SYNC)) != 0) {
|
||||
// for log reply or peer sync, we don't need to be connected to ZK
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue