You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by is...@apache.org on 2017/02/07 11:58:23 UTC

lucene-solr:master: SOLR-5944: Use SolrCmdDistributor's synchronous mode for in-place updates

Repository: lucene-solr
Updated Branches:
  refs/heads/master 6520d06ce -> 3574404e3


SOLR-5944: Use SolrCmdDistributor's synchronous mode for in-place updates


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/3574404e
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/3574404e
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/3574404e

Branch: refs/heads/master
Commit: 3574404e3d3d5758c0d07f73fda72decc97c07d2
Parents: 6520d06
Author: Ishan Chattopadhyaya <is...@apache.org>
Authored: Tue Feb 7 03:58:13 2017 -0800
Committer: Ishan Chattopadhyaya <is...@apache.org>
Committed: Tue Feb 7 03:58:13 2017 -0800

----------------------------------------------------------------------
 .../solr/update/processor/DistributedUpdateProcessor.java | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/3574404e/solr/core/src/java/org/apache/solr/update/processor/DistributedUpdateProcessor.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/update/processor/DistributedUpdateProcessor.java b/solr/core/src/java/org/apache/solr/update/processor/DistributedUpdateProcessor.java
index 8f5d909..e36b7c9 100644
--- a/solr/core/src/java/org/apache/solr/update/processor/DistributedUpdateProcessor.java
+++ b/solr/core/src/java/org/apache/solr/update/processor/DistributedUpdateProcessor.java
@@ -799,8 +799,16 @@ public class DistributedUpdateProcessor extends UpdateRequestProcessor {
 
       if (cmd.isInPlaceUpdate()) {
         params.set(DISTRIB_INPLACE_PREVVERSION, String.valueOf(cmd.prevVersion));
+        // Use synchronous=true so that a new connection is used, instead
+        // of the update being streamed through an existing streaming client.
+        // When using a streaming client, the previous update
+        // and the current in-place update (that depends on the previous update), if reordered
+        // in the stream, can result in the current update being bottled up behind the previous
+        // update in the stream and can lead to degraded performance.
+        cmdDistrib.distribAdd(cmd, nodes, params, true, replicationTracker);
+      } else {
+        cmdDistrib.distribAdd(cmd, nodes, params, false, replicationTracker);
       }
-      cmdDistrib.distribAdd(cmd, nodes, params, false, replicationTracker);
     }
     
     // TODO: what to do when no idField?