(full) recovery memory based indices with local gateway, don't fail them, closes #2077.

This commit is contained in:
Shay Banon 2012-07-02 00:31:10 +02:00
parent bdf146ded6
commit b2c4876626
2 changed files with 5 additions and 1 deletions

View File

@ -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) {

View File

@ -124,6 +124,10 @@ public class Store extends AbstractIndexShardComponent {
indexSettingsService.addListener(applySettings);
}
public IndexStore indexStore() {
return this.indexStore;
}
public Directory directory() {
return directory;
}