fluo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ktur...@apache.org
Subject incubator-fluo git commit: closes #809 - cleanup buffered data
Date Wed, 10 May 2017 13:57:01 GMT
Repository: incubator-fluo
Updated Branches:
  refs/heads/master ab7ce36c2 -> 4055cdfbe


closes #809 - cleanup buffered data

closes #832


Project: http://git-wip-us.apache.org/repos/asf/incubator-fluo/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-fluo/commit/4055cdfb
Tree: http://git-wip-us.apache.org/repos/asf/incubator-fluo/tree/4055cdfb
Diff: http://git-wip-us.apache.org/repos/asf/incubator-fluo/diff/4055cdfb

Branch: refs/heads/master
Commit: 4055cdfbe13eb34f8830db3ba2201c6428d26fd4
Parents: ab7ce36
Author: Michael Wall <mjwall@gmail.com>
Authored: Tue May 9 08:21:36 2017 -0400
Committer: Keith Turner <kturner@apache.org>
Committed: Wed May 10 09:55:13 2017 -0400

----------------------------------------------------------------------
 .../org/apache/fluo/core/impl/TransactionImpl.java    | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-fluo/blob/4055cdfb/modules/core/src/main/java/org/apache/fluo/core/impl/TransactionImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/fluo/core/impl/TransactionImpl.java b/modules/core/src/main/java/org/apache/fluo/core/impl/TransactionImpl.java
index 322ae77..8313220 100644
--- a/modules/core/src/main/java/org/apache/fluo/core/impl/TransactionImpl.java
+++ b/modules/core/src/main/java/org/apache/fluo/core/impl/TransactionImpl.java
@@ -596,9 +596,16 @@ public class TransactionImpl extends AbstractTransactionBase implements
AsyncTra
 
   @Override
   public synchronized void commit() throws CommitException {
-    SyncCommitObserver sco = new SyncCommitObserver();
-    commitAsync(sco);
-    sco.waitForCommit();
+    SyncCommitObserver sco = null;
+    try {
+      sco = new SyncCommitObserver();
+      commitAsync(sco);
+      sco.waitForCommit();
+    } finally {
+      updates.clear();
+      weakNotification = null;
+      columnsRead.clear();
+    }
   }
 
   void deleteWeakRow() {
@@ -908,7 +915,6 @@ public class TransactionImpl extends AbstractTransactionBase implements
AsyncTra
     cd.acceptedRows = new HashSet<>();
 
 
-
     ListenableFuture<Iterator<Result>> future = cd.bacw.apply(mutations);
     Futures.addCallback(future, new CommitCallback<Iterator<Result>>(cd) {
       @Override


Mime
View raw message