use safe method (to get proper exception) to get shard injector
This commit is contained in:
parent
f6fa056f1c
commit
61fadb4dc0
|
@ -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());
|
||||||
|
|
Loading…
Reference in New Issue