You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "heesung-sn (via GitHub)" <gi...@apache.org> on 2023/08/14 18:47:22 UTC

[GitHub] [pulsar] heesung-sn commented on a diff in pull request #20988: [fix][broker] Fix can't stop phase-two of compaction even though messageId read reaches lastReadId

heesung-sn commented on code in PR #20988:
URL: https://github.com/apache/pulsar/pull/20988#discussion_r1293844204


##########
pulsar-broker/src/main/java/org/apache/pulsar/compaction/TwoPhaseCompactor.java:
##########
@@ -277,6 +277,7 @@ private void phaseTwoLoop(RawReader reader, MessageId to, Map<String, MessageId>
                                     promise.complete(null);
                                 }
                             });
+                            return;

Review Comment:
   What if some of the previous addToCompactedLedger aync write fail later, but the last id's addToCompactedLedger is complete first? Do we mark the `promise` as successful here? 
   
   Don't we need to wait for all outstanding addToCompactedLedger to be complete before making `promise` complete?
   
   
   



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