(full) recovery memory based indices with local gateway, don't fail them, closes #2077.
This commit is contained in:
parent
bdf146ded6
commit
b2c4876626
|
@ -116,7 +116,7 @@ public class LocalIndexShardGateway extends AbstractIndexShardComponent implemen
|
|||
IndexWriter writer = new IndexWriter(indexShard.store().directory(), new IndexWriterConfig(Lucene.VERSION, Lucene.STANDARD_ANALYZER).setOpenMode(IndexWriterConfig.OpenMode.CREATE));
|
||||
writer.close();
|
||||
}
|
||||
} else if (indexShouldExists) {
|
||||
} else if (indexShouldExists && indexShard.store().indexStore().persistent()) {
|
||||
throw new IndexShardGatewayRecoveryException(shardId(), "shard allocated for local recovery (post api), should exists, but doesn't");
|
||||
}
|
||||
} catch (IOException e) {
|
||||
|
|
|
@ -124,6 +124,10 @@ public class Store extends AbstractIndexShardComponent {
|
|||
indexSettingsService.addListener(applySettings);
|
||||
}
|
||||
|
||||
public IndexStore indexStore() {
|
||||
return this.indexStore;
|
||||
}
|
||||
|
||||
public Directory directory() {
|
||||
return directory;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue