ACCUMULO-4060 Addendum store.reserve() might also throw an exception. Accidental omission from the original bugfix. The structure of the existing try-block left a code path which could throw an exception outside of the try which allowed exceptions to propagate and kill the runner threads.
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/ef8c1ca1 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/ef8c1ca1 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/ef8c1ca1 Branch: refs/heads/1.7 Commit: ef8c1ca1e5ddc7e41a36b05bb020b4e66de6d495 Parents: 4eb8085 Author: Josh Elser <[email protected]> Authored: Wed Dec 9 11:13:25 2015 -0500 Committer: Josh Elser <[email protected]> Committed: Wed Dec 9 11:13:25 2015 -0500 ---------------------------------------------------------------------- fate/src/main/java/org/apache/accumulo/fate/Fate.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/accumulo/blob/ef8c1ca1/fate/src/main/java/org/apache/accumulo/fate/Fate.java ---------------------------------------------------------------------- diff --git a/fate/src/main/java/org/apache/accumulo/fate/Fate.java b/fate/src/main/java/org/apache/accumulo/fate/Fate.java index 52c7b2f..d6176c8 100644 --- a/fate/src/main/java/org/apache/accumulo/fate/Fate.java +++ b/fate/src/main/java/org/apache/accumulo/fate/Fate.java @@ -53,8 +53,9 @@ public class Fate<T> { public void run() { while (keepRunning.get()) { long deferTime = 0; - long tid = store.reserve(); + Long tid = null; try { + tid = store.reserve(); TStatus status = store.getStatus(tid); Repo<T> op = store.top(tid); if (status == TStatus.FAILED_IN_PROGRESS) { @@ -95,7 +96,9 @@ public class Fate<T> { } catch (Exception e) { runnerLog.error("Uncaught exception in FATE runner thread.", e); } finally { - store.unreserve(tid, deferTime); + if (null != tid) { + store.unreserve(tid, deferTime); + } } }
