You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by sh...@apache.org on 2013/05/29 19:21:49 UTC

svn commit: r1487554 - in /lucene/dev/branches/lucene_solr_4_3: ./ solr/ solr/CHANGES.txt solr/core/ solr/core/src/java/org/apache/solr/update/processor/DistributedUpdateProcessor.java

Author: shalin
Date: Wed May 29 17:21:48 2013
New Revision: 1487554

URL: http://svn.apache.org/r1487554
Log:
SOLR-4855: DistributedUpdateProcessor doesn't check for peer sync requests

Modified:
    lucene/dev/branches/lucene_solr_4_3/   (props changed)
    lucene/dev/branches/lucene_solr_4_3/solr/   (props changed)
    lucene/dev/branches/lucene_solr_4_3/solr/CHANGES.txt   (contents, props changed)
    lucene/dev/branches/lucene_solr_4_3/solr/core/   (props changed)
    lucene/dev/branches/lucene_solr_4_3/solr/core/src/java/org/apache/solr/update/processor/DistributedUpdateProcessor.java

Modified: lucene/dev/branches/lucene_solr_4_3/solr/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene_solr_4_3/solr/CHANGES.txt?rev=1487554&r1=1487553&r2=1487554&view=diff
==============================================================================
--- lucene/dev/branches/lucene_solr_4_3/solr/CHANGES.txt (original)
+++ lucene/dev/branches/lucene_solr_4_3/solr/CHANGES.txt Wed May 29 17:21:48 2013
@@ -86,6 +86,8 @@ Bug Fixes
 * SOLR-4868: Setting the log level for the log4j root category results in
   adding a new category, the empty string. (Shawn Heisey)
 
+* SOLR-4855: DistributedUpdateProcessor doesn't check for peer sync requests (shalin)
+
 Other Changes
 ----------------------
 

Modified: lucene/dev/branches/lucene_solr_4_3/solr/core/src/java/org/apache/solr/update/processor/DistributedUpdateProcessor.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene_solr_4_3/solr/core/src/java/org/apache/solr/update/processor/DistributedUpdateProcessor.java?rev=1487554&r1=1487553&r2=1487554&view=diff
==============================================================================
--- lucene/dev/branches/lucene_solr_4_3/solr/core/src/java/org/apache/solr/update/processor/DistributedUpdateProcessor.java (original)
+++ lucene/dev/branches/lucene_solr_4_3/solr/core/src/java/org/apache/solr/update/processor/DistributedUpdateProcessor.java Wed May 29 17:21:48 2013
@@ -311,7 +311,7 @@ public class DistributedUpdateProcessor 
   }
 
   private void doDefensiveChecks(DistribPhase phase) {
-    boolean isReplayOrPeersync = (updateCommand.getFlags() & (UpdateCommand.REPLAY | UpdateCommand.REPLAY)) != 0;
+    boolean isReplayOrPeersync = (updateCommand.getFlags() & (UpdateCommand.REPLAY | UpdateCommand.PEER_SYNC)) != 0;
     if (isReplayOrPeersync) return;
 
     String from = req.getParams().get("distrib.from");
@@ -558,7 +558,7 @@ public class DistributedUpdateProcessor 
       }
     }
 
-    boolean isReplayOrPeersync = (cmd.getFlags() & (UpdateCommand.REPLAY | UpdateCommand.REPLAY)) != 0;
+    boolean isReplayOrPeersync = (cmd.getFlags() & (UpdateCommand.REPLAY | UpdateCommand.PEER_SYNC)) != 0;
     boolean leaderLogic = isLeader && !isReplayOrPeersync;
 
 
@@ -915,7 +915,7 @@ public class DistributedUpdateProcessor 
     }
     versionOnUpdate = Math.abs(versionOnUpdate);  // normalize to positive version
 
-    boolean isReplayOrPeersync = (cmd.getFlags() & (UpdateCommand.REPLAY | UpdateCommand.REPLAY)) != 0;
+    boolean isReplayOrPeersync = (cmd.getFlags() & (UpdateCommand.REPLAY | UpdateCommand.PEER_SYNC)) != 0;
     boolean leaderLogic = isLeader && !isReplayOrPeersync;
 
     if (!leaderLogic && versionOnUpdate==0) {
@@ -1027,7 +1027,7 @@ public class DistributedUpdateProcessor 
     long signedVersionOnUpdate = versionOnUpdate;
     versionOnUpdate = Math.abs(versionOnUpdate);  // normalize to positive version
 
-    boolean isReplayOrPeersync = (cmd.getFlags() & (UpdateCommand.REPLAY | UpdateCommand.REPLAY)) != 0;
+    boolean isReplayOrPeersync = (cmd.getFlags() & (UpdateCommand.REPLAY | UpdateCommand.PEER_SYNC)) != 0;
     boolean leaderLogic = isLeader && !isReplayOrPeersync;
 
     if (!leaderLogic && versionOnUpdate==0) {