Add missing await into an interruptable block

This commit is contained in:
Simon Willnauer 2014-11-20 15:27:53 +01:00
parent 06e907d99e
commit 17110508ac
1 changed files with 13 additions and 9 deletions

View File

@ -529,6 +529,9 @@ 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);
} }
cancelableThreads.run(new Interruptable() {
@Override
public void run() throws InterruptedException {
try { try {
if (!updatedOnMaster.await(internalActionTimeout.millis(), TimeUnit.MILLISECONDS)) { if (!updatedOnMaster.await(internalActionTimeout.millis(), TimeUnit.MILLISECONDS)) {
logger.debug("[{}][{}] recovery [phase2] to {}: waiting on pending mapping update timed out. waited [{}]", logger.debug("[{}][{}] recovery [phase2] to {}: waiting on pending mapping update timed out. waited [{}]",
@ -538,7 +541,8 @@ public final class ShardRecoveryHandler implements Engine.RecoveryHandler {
Thread.currentThread().interrupt(); Thread.currentThread().interrupt();
logger.debug("interrupted while waiting for mapping to update on master"); logger.debug("interrupted while waiting for mapping to update on master");
} }
}
});
} }
/** /**