You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/04/01 04:36:44 UTC

[GitHub] [pulsar] gaoran10 commented on a change in pull request #14974: [Fix][Transaction] Fix transaction pendingAckStore asyncMarkDelete

gaoran10 commented on a change in pull request #14974:
URL: https://github.com/apache/pulsar/pull/14974#discussion_r840223124



##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/transaction/pendingack/impl/MLPendingAckStore.java
##########
@@ -241,8 +241,8 @@ public void addComplete(Position position, ByteBuf entryData, Object ctx) {
                 completableFuture.complete(null);
 
                 if (!metadataPositions.isEmpty()) {
-                    PositionImpl firstPosition = metadataPositions.firstEntry().getKey();
-                    PositionImpl deletePosition = metadataPositions.firstEntry().getKey();
+                    PositionImpl firstPosition = PositionImpl.EARLIEST;

Review comment:
       I'm not sure why need `firstPosition`, maybe we can initialize the `deletePosition` as a null value, after checking, if the `deletePosition` is not null, then we can call the method `cursor.asyncMarkDelete`.




-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org