accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From els...@apache.org
Subject [1/6] accumulo git commit: ACCUMULO-4060 Addendum store.reserve() might also throw an exception.
Date Wed, 09 Dec 2015 17:00:18 GMT
Repository: accumulo
Updated Branches:
  refs/heads/1.6 4eb80855f -> ef8c1ca1e
  refs/heads/1.7 f85717cbd -> 904e957c4
  refs/heads/master 1bcddcfa0 -> fbbc0c54b


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.6
Commit: ef8c1ca1e5ddc7e41a36b05bb020b4e66de6d495
Parents: 4eb8085
Author: Josh Elser <elserj@apache.org>
Authored: Wed Dec 9 11:13:25 2015 -0500
Committer: Josh Elser <elserj@apache.org>
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);
+          }
         }
 
       }


Mime
View raw message