Add missing await into an interruptable block
This commit is contained in:
parent
06e907d99e
commit
17110508ac
|
@ -529,16 +529,20 @@ public final class ShardRecoveryHandler implements Engine.RecoveryHandler {
|
||||||
for (DocumentMapper documentMapper : documentMappersToUpdate) {
|
for (DocumentMapper documentMapper : documentMappersToUpdate) {
|
||||||
mappingUpdatedAction.updateMappingOnMaster(indexService.index().getName(), documentMapper, indexService.indexUUID(), listener);
|
mappingUpdatedAction.updateMappingOnMaster(indexService.index().getName(), documentMapper, indexService.indexUUID(), listener);
|
||||||
}
|
}
|
||||||
try {
|
cancelableThreads.run(new Interruptable() {
|
||||||
if (!updatedOnMaster.await(internalActionTimeout.millis(), TimeUnit.MILLISECONDS)) {
|
@Override
|
||||||
logger.debug("[{}][{}] recovery [phase2] to {}: waiting on pending mapping update timed out. waited [{}]",
|
public void run() throws InterruptedException {
|
||||||
indexName, shardId, request.targetNode(), internalActionTimeout);
|
try {
|
||||||
|
if (!updatedOnMaster.await(internalActionTimeout.millis(), TimeUnit.MILLISECONDS)) {
|
||||||
|
logger.debug("[{}][{}] recovery [phase2] to {}: waiting on pending mapping update timed out. waited [{}]",
|
||||||
|
indexName, shardId, request.targetNode(), internalActionTimeout);
|
||||||
|
}
|
||||||
|
} catch (InterruptedException e) {
|
||||||
|
Thread.currentThread().interrupt();
|
||||||
|
logger.debug("interrupted while waiting for mapping to update on master");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} catch (InterruptedException e) {
|
});
|
||||||
Thread.currentThread().interrupt();
|
|
||||||
logger.debug("interrupted while waiting for mapping to update on master");
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue