SOLR-11702: Fix precommit, only throw error to client if the replica is not in the same shard as leader

This commit is contained in:
Cao Manh Dat 2018-03-09 10:34:59 +07:00
parent 588e19eda1
commit dae572819b
1 changed files with 5 additions and 2 deletions

View File

@ -897,8 +897,11 @@ public class DistributedUpdateProcessor extends UpdateRequestProcessor {
log.warn("Core "+cloudDesc.getCoreNodeName()+" belonging to "+collection+" "+
shardId+", does not have error'd node " + stdNode.getNodeProps().getCoreUrl() + " as a replica. " +
"No request recovery command will be sent!");
// some replicas did not receive the updates, exception must be notified to clients
if (!shardId.equals(cloudDesc.getShardId())) {
// some replicas on other shard did not receive the updates (ex: during splitshard),
// exception must be notified to clients
errorsForClient.add(error);
}
} else {
log.warn("Core " + cloudDesc.getCoreNodeName() + " is no longer the leader for " + collection + " "
+ shardId + " or we tried to put ourself into LIR, no request recovery command will be sent!");