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 2018/02/17 07:20:34 UTC

[GitHub] merlimat commented on a change in pull request #1231: Read from compacted topic ledger if available and enabled

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

 ##########
 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:
   Once we finish reading the compacted snapshot, shouldn't the consumer switch to get messages from the point after the snapshot?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services