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 2021/12/28 09:53:39 UTC

[GitHub] [pulsar] codelipenghui commented on a change in pull request #13533: Return message ID from compacted ledger while the compaction cursor reach the end of the topic

codelipenghui commented on a change in pull request #13533:
URL: https://github.com/apache/pulsar/pull/13533#discussion_r775821748



##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/compaction/CompactedTopicImpl.java
##########
@@ -311,9 +310,8 @@ private static int comparePositionAndMessageId(PositionImpl p, MessageIdData m)
             .compare(p.getEntryId(), m.getEntryId()).result();
     }
 
-    @VisibleForTesting
-    PositionImpl getCompactionHorizon() {
-        return this.compactionHorizon;
+    public synchronized Optional<Position> getCompactionHorizon() {

Review comment:
       Another thread update the `compactionHorizon` https://github.com/apache/pulsar/blob/07ef9231db8b844586b9217ee2d59237eb9c54b7/pulsar-broker/src/main/java/org/apache/pulsar/compaction/CompactedTopicImpl.java#L70




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