fantapsody opened a new pull request #6237: [Issue 6173][compaction] Fix log 
compaction for flow control/empty topic/last deletion
URL: https://github.com/apache/pulsar/pull/6237
 
 
   Fixes https://github.com/apache/pulsar/issues/6173
   
   ### Motivation
   
   Fixes problems for log compaction found in issue 
https://github.com/apache/pulsar/issues/6173 :
   
   1. Compaction fails for an empty topic. 
   2. Compaction never ends if the value of the last message is an empty batch 
message when the compaction is triggered. 
   3. Compaction fails for a topic with batch messages because RawReader flow 
control doesn't handle batch messages properly.
   
   ### Modifications
   
   1. Check if any message is available before compaction phases, and finish 
the compaction immediately if there is no messages to read to avoid timeout 
exception.
   2. Add missing check for empty batch message for the condition to end the 
phase 2 loop.
   3. Increase correct number of available permits in RawConsumer for batch 
messages.
   
   ### Verifying this change
   
   Producing messages in both batch and not-batch mode in corresponding tests.
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to