SOLR-4744: hackish attempt to get basic non cloud functionality to work again

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1489222 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Chris M. Hostetter 2013-06-03 23:01:20 +00:00
parent 2456fe59c0
commit 9f5d970641
1 changed files with 5 additions and 4 deletions

View File

@ -869,7 +869,8 @@ public class DistributedUpdateProcessor extends UpdateRequestProcessor {
DistribPhase phase =
DistribPhase.parseParam(req.getParams().get(DISTRIB_UPDATE_PARAM));
DocCollection coll = zkController.getClusterState().getCollection(collection);
DocCollection coll = zkEnabled
? zkController.getClusterState().getCollection(collection) : null;
if (zkEnabled && DistribPhase.NONE == phase) {
boolean leaderForAnyShard = false; // start off by assuming we are not a leader for any shard
@ -984,10 +985,10 @@ public class DistributedUpdateProcessor extends UpdateRequestProcessor {
vinfo.unblockUpdates();
}
List<Node> subShardLeaders = getSubShardLeaders(coll, cloudDesc.getShardId(), null, null);
// forward to all replicas
if (leaderLogic) {
if (leaderLogic && zkEnabled) {
List<Node> subShardLeaders = getSubShardLeaders(coll, cloudDesc.getShardId(), null, null);
ModifiableSolrParams params = new ModifiableSolrParams(filterParams(req.getParams()));
params.set(VERSION_FIELD, Long.toString(cmd.getVersion()));
params.set(DISTRIB_UPDATE_PARAM, DistribPhase.FROMLEADER.toString());