poorbarcode commented on code in PR #16758:
URL: https://github.com/apache/pulsar/pull/16758#discussion_r942612473


##########
pulsar-transaction/coordinator/src/main/java/org/apache/pulsar/transaction/coordinator/impl/TxnLogBufferedWriter.java:
##########
@@ -541,8 +545,52 @@ public void recycle(){
             this.asyncAddArgsList.clear();
             this.handle.recycle(this);
         }
+
+        public void addCallback(AddDataCallback callback, Object ctx){
+            AsyncAddArgs asyncAddArgs = AsyncAddArgs.newInstance(callback, 
ctx, System.currentTimeMillis());
+            asyncAddArgsList.add(asyncAddArgs);
+        }
     }
 
+    private final BookKeeperBatchedWriteCallback 
bookKeeperBatchedWriteCallback = new BookKeeperBatchedWriteCallback();

Review Comment:
   Good idea. I have moved both `bookKeeperBatchedWriteCallback` and 
`timingFlushTask` to the variables-place and moved `STATE_UPDATER` to the 
static-variables-place



-- 
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