lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yo...@apache.org
Subject svn commit: r1712034 - /lucene/dev/trunk/solr/core/src/java/org/apache/solr/update/processor/DistributedUpdateProcessor.java
Date Mon, 02 Nov 2015 14:58:29 GMT
Author: yonik
Date: Mon Nov  2 14:58:28 2015
New Revision: 1712034

URL: http://svn.apache.org/viewvc?rev=1712034&view=rev
Log:
SOLR-8203: reject updates if core container is shutting down

Modified:
    lucene/dev/trunk/solr/core/src/java/org/apache/solr/update/processor/DistributedUpdateProcessor.java

Modified: lucene/dev/trunk/solr/core/src/java/org/apache/solr/update/processor/DistributedUpdateProcessor.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/java/org/apache/solr/update/processor/DistributedUpdateProcessor.java?rev=1712034&r1=1712033&r2=1712034&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/java/org/apache/solr/update/processor/DistributedUpdateProcessor.java
(original)
+++ lucene/dev/trunk/solr/core/src/java/org/apache/solr/update/processor/DistributedUpdateProcessor.java
Mon Nov  2 14:58:28 2015
@@ -1443,6 +1443,14 @@ public class DistributedUpdateProcessor
   }
 
   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;



Mime
View raw message