Skip to content

Commit

Permalink
Core: Added missing return statements.
Browse files Browse the repository at this point in the history
Closes #6841
  • Loading branch information
martijnvg committed Jul 13, 2014
1 parent 60b317c commit af38b9f
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ public ShardStateAction(Settings settings, ClusterService clusterService, Transp
public void shardFailed(final ShardRouting shardRouting, final String indexUUID, final String reason) throws ElasticsearchException {
DiscoveryNode masterNode = clusterService.state().nodes().masterNode();
if (masterNode == null) {
logger.debug("can't send shard failed for {}. no master known.", shardRouting);
logger.warn("can't send shard failed for {}. no master known.", shardRouting);
return;
}
shardFailed(shardRouting, indexUUID, reason, masterNode);
}
Expand All @@ -89,7 +90,7 @@ public void shardFailed(final ShardRouting shardRouting, final String indexUUID,
if (clusterService.localNode().equals(masterNode)) {
innerShardFailed(shardRoutingEntry);
} else {
transportService.sendRequest(clusterService.state().nodes().masterNode(),
transportService.sendRequest(masterNode,
ShardFailedTransportHandler.ACTION, shardRoutingEntry, new EmptyTransportResponseHandler(ThreadPool.Names.SAME) {
@Override
public void handleException(TransportException exp) {
Expand All @@ -102,7 +103,8 @@ public void handleException(TransportException exp) {
public void shardStarted(final ShardRouting shardRouting, String indexUUID, final String reason) throws ElasticsearchException {
DiscoveryNode masterNode = clusterService.state().nodes().masterNode();
if (masterNode == null) {
logger.debug("can't send shard started for {}. no master known.", shardRouting);
logger.warn("can't send shard started for {}. no master known.", shardRouting);
return;
}
shardStarted(shardRouting, indexUUID, reason, masterNode);
}
Expand Down

0 comments on commit af38b9f

Please sign in to comment.