HBASE-11488 cancelTasks in SubprocedurePool can hang during task error (Jerry He)
This commit is contained in:
parent
f2a40fc058
commit
c6ddc0336e
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue