forked from apache/pulsar
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Issue 6173][compaction] Fix log compaction for flow control/empty to…
…pic/last deletion (apache#6237) Fixes apache#6173 ### Motivation Fixes problems for log compaction found in issue apache#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.
- Loading branch information
1 parent
b098b18
commit 4d8c0f2
Showing
7 changed files
with
115 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters