SOLR-4855: DistributedUpdateProcessor doesn't check for peer sync requests

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1487538 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Shalin Shekhar Mangar 2013-05-29 16:40:28 +00:00
parent b9ee14c82b
commit f9a5dc2c88
2 changed files with 6 additions and 4 deletions

View File

@ -116,6 +116,8 @@ Bug Fixes
* SOLR-4863: Removed non-existent attribute sourceId from dynamic JMX stats
to fix AttributeNotFoundException (suganuma, hossman via shalin)
* SOLR-4855: DistributedUpdateProcessor doesn't check for peer sync requests (shalin)
Other Changes
----------------------

View File

@ -312,7 +312,7 @@ public class DistributedUpdateProcessor extends UpdateRequestProcessor {
}
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");
@ -559,7 +559,7 @@ public class DistributedUpdateProcessor extends UpdateRequestProcessor {
}
}
boolean isReplayOrPeersync = (cmd.getFlags() & (UpdateCommand.REPLAY | UpdateCommand.REPLAY)) != 0;
boolean isReplayOrPeersync = (cmd.getFlags() & (UpdateCommand.REPLAY | UpdateCommand.PEER_SYNC)) != 0;
boolean leaderLogic = isLeader && !isReplayOrPeersync;
@ -917,7 +917,7 @@ public class DistributedUpdateProcessor extends UpdateRequestProcessor {
}
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) {
@ -1029,7 +1029,7 @@ public class DistributedUpdateProcessor extends UpdateRequestProcessor {
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) {