ivankelly commented on a change in pull request #1231: Read from compacted 
topic ledger if available and enabled
URL: https://github.com/apache/incubator-pulsar/pull/1231#discussion_r169111932
 
 

 ##########
 File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentDispatcherSingleActiveConsumer.java
 ##########
 @@ -297,7 +297,11 @@ protected void readMoreEntries(Consumer consumer) {
                 log.debug("[{}-{}] Schedule read of {} messages", name, 
consumer, messagesToRead);
             }
             havePendingRead = true;
-            cursor.asyncReadEntriesOrWait(messagesToRead, this, consumer);
+            if (consumer.readCompacted()) {
+                topic.compactedTopic.asyncReadEntriesOrWait(cursor, 
messagesToRead, this, consumer);
 
 Review comment:
   well, when the other compaction finishes, it will send the acknowledgement 
to the broker, and this will update the ledger. We will read from this ledger 
from this point on.
   
   I think this should also be the point where we delete the old ledger, as 
noone will be reading from it.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to