eolivelli commented on a change in pull request #11407:
URL: https://github.com/apache/pulsar/pull/11407#discussion_r673748945



##########
File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/transaction/buffer/impl/TopicTransactionBuffer.java
##########
@@ -206,24 +206,28 @@ private void handleTransactionMessage(TxnID txnId, 
Position position) {
         ByteBuf commitMarker = Markers.newTxnCommitMarker(-1L, 
txnID.getMostSigBits(),
                 txnID.getLeastSigBits());
 
-        topic.getManagedLedger().asyncAddEntry(commitMarker, new 
AsyncCallbacks.AddEntryCallback() {
-            @Override
-            public void addComplete(Position position, ByteBuf entryData, 
Object ctx) {
-                synchronized (TopicTransactionBuffer.this) {
-                    updateMaxReadPosition(txnID);
-                    handleLowWaterMark(txnID, lowWaterMark);
-                    clearAbortedTransactions();
-                    takeSnapshotByChangeTimes();
+        try {
+            topic.getManagedLedger().asyncAddEntry(commitMarker, new 
AsyncCallbacks.AddEntryCallback() {

Review comment:
       should we release commitMarker in this thread or inside the callback ?




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