[STORE] increment store in NoneIndexShardGateway and either check if dir is null or different but not both
This commit is contained in:
parent
17fdee9441
commit
0ac9912b89
|
@ -63,11 +63,14 @@ public class NoneIndexShardGateway extends AbstractIndexShardComponent implement
|
|||
recoveryState.getIndex().startTime(System.currentTimeMillis());
|
||||
// in the none case, we simply start the shard
|
||||
// clean the store, there should be nothing there...
|
||||
indexShard.store().incRef();
|
||||
try {
|
||||
logger.debug("cleaning shard content before creation");
|
||||
indexShard.store().deleteContent();
|
||||
} catch (IOException e) {
|
||||
logger.warn("failed to clean store before starting shard", e);
|
||||
} finally {
|
||||
indexShard.store().decRef();
|
||||
}
|
||||
indexShard.postRecovery("post recovery from gateway");
|
||||
recoveryState.getIndex().time(System.currentTimeMillis() - recoveryState.getIndex().startTime());
|
||||
|
|
|
@ -203,8 +203,7 @@ public final class DistributorDirectory extends BaseDirectory {
|
|||
builder.append("File ").append(file)
|
||||
.append(" was not mapped to a directory but exists in one of the distributors directories")
|
||||
.append(System.lineSeparator());
|
||||
}
|
||||
if (directory != d) {
|
||||
} else if (directory != d) {
|
||||
consistent = false;
|
||||
builder.append("File ").append(file).append(" was mapped to a directory ").append(directory)
|
||||
.append(" but exists in another distributor directory").append(d)
|
||||
|
|
Loading…
Reference in New Issue