keith-turner commented on a change in pull request #1001: [WIP] - Issue 978
URL: https://github.com/apache/fluo/pull/1001#discussion_r163347705
 
 

 ##########
 File path: 
modules/core/src/main/java/org/apache/fluo/core/impl/TransactionImpl.java
 ##########
 @@ -1141,178 +1210,340 @@ private void beginSecondCommitPhase(CommitData cd, 
Stamp commitStamp) throws Exc
       //
       // Its very important the notifications which trigger an observer are 
deleted after the 2nd
       // phase of commit finishes.
-      getStats().setCommitTs(commitStamp.getTxTimestamp());
-      writeNotificationsAsync(cd, commitStamp.getTxTimestamp());
+      return 
env.getSharedResources().getOracleClient().getStampAsync().thenApply(commitStamp
 -> {
+        if (startTs < commitStamp.getGcTimestamp()) {
+          return false;
+        } else {
+          getStats().setCommitTs(commitStamp.getTxTimestamp());
+          return true;
+        }
+      });
     }
+
+    @Override
+    CompletableFuture<Void> getFailureOp(CommitData cd) {
+      return CompletableFuture.supplyAsync(() -> {
 
 Review comment:
   After `throws Exception` is dropped from rollbackLocks, seems like this code 
should be : 
   
   ```java
     CompletableFuture<Void> getFailureOp(CommitData cd) {
         return rollbackLocks(cd);
       }
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to