HBASE-11488 cancelTasks in SubprocedurePool can hang during task error (Jerry He)

This commit is contained in:
Enis Soztutar 2014-07-11 14:16:27 -07:00
parent f2a40fc058
commit c6ddc0336e
2 changed files with 4 additions and 10 deletions

View File

@ -282,11 +282,8 @@ public class RegionServerFlushTableProcedureManager extends RegionServerProcedur
} }
// evict remaining tasks and futures from taskPool. // evict remaining tasks and futures from taskPool.
while (!futures.isEmpty()) { futures.clear();
// block to remove cancelled futures; while (taskPool.poll() != null) {}
LOG.warn("Removing cancelled elements from taskPool");
futures.remove(taskPool.take());
}
stop(); stop();
} }

View File

@ -360,11 +360,8 @@ public class RegionServerSnapshotManager extends RegionServerProcedureManager {
} }
// evict remaining tasks and futures from taskPool. // evict remaining tasks and futures from taskPool.
while (!futures.isEmpty()) { futures.clear();
// block to remove cancelled futures; while (taskPool.poll() != null) {}
LOG.warn("Removing cancelled elements from taskPool");
futures.remove(taskPool.take());
}
stop(); stop();
} }