congbobo184 commented on a change in pull request #13828:
URL: https://github.com/apache/pulsar/pull/13828#discussion_r790544073



##########
File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/TransactionMetadataStoreService.java
##########
@@ -319,8 +319,14 @@ public long getLowWaterMark(TxnID txnID) {
         return store.updateTxnStatus(txnId, newStatus, expectedStatus, 
isTimeout);
     }
 
-    public CompletableFuture<Void> endTransaction(TxnID txnID, int txnAction, 
boolean isTimeout) {
-        CompletableFuture<Void> completableFuture = new CompletableFuture<>();
+    public CompletableFuture<Void> endTransaction(TxnID txnID, int txnAction, 
boolean isTimeout,

Review comment:
       ```    
   public CompletableFuture<Void> endTransaction(TxnID txnID, int txnAction, 
boolean isTimeout) {
           CompletableFuture<Void> completableFuture = new 
CompletableFuture<>();
           return endTransaction txnID, txnAction, isTimeout, 
completableFuture);
   }
   ```
   code like this may be better

##########
File path: 
pulsar-broker/src/test/java/org/apache/pulsar/broker/transaction/TransactionTest.java
##########
@@ -729,4 +730,38 @@ public void testNoEntryCanBeReadWhenRecovery() throws 
Exception {
         TopicTransactionBuffer transactionBuffer = new 
TopicTransactionBuffer(persistentTopic);
         Awaitility.await().untilAsserted(() -> 
Assert.assertTrue(transactionBuffer.checkIfReady()));
     }
+
+    @Test
+    public void testRetryExceptionOfEndTxn() throws Exception{

Review comment:
       Could you please explain in detail the purpose of this test?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to