use safe method (to get proper exception) to get shard injector

This commit is contained in:
kimchy 2010-07-14 23:39:19 +03:00
parent f6fa056f1c
commit 61fadb4dc0
1 changed files with 1 additions and 1 deletions

View File

@ -315,7 +315,7 @@ public class IndicesClusterStateService extends AbstractLifecycleComponent<Indic
return; return;
} }
try { try {
RecoveryAction recoveryAction = indexService.shardInjector(shardId).getInstance(RecoveryAction.class); RecoveryAction recoveryAction = indexService.shardInjectorSafe(shardId).getInstance(RecoveryAction.class);
if (!shardRouting.primary()) { if (!shardRouting.primary()) {
// recovery from primary // recovery from primary
IndexShardRoutingTable shardRoutingTable = routingTable.index(shardRouting.index()).shard(shardRouting.id()); IndexShardRoutingTable shardRoutingTable = routingTable.index(shardRouting.index()).shard(shardRouting.id());