[fix][broker] Fix delayed-delivery bucket merge failures when delayedDeliveryMaxNumBuckets is 1-3 - #26242
Merged
nodece merged 3 commits intoJul 29, 2026
Conversation
Member
|
@void-ptr974 Please check conflicts. |
Resolve the delayed-delivery test conflicts.
nodece
approved these changes
Jul 29, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #26241
Motivation
When
delayedDeliveryMaxNumBucketsis set to1,2, or3, the firstbucket-limit overflow contains
2,3, or4immutable buckets. The mergeselector requires more than four buckets and throws
IllegalArgumentException,which fails the merge future and skips that compaction attempt.
The selector also uses an off-by-one timestamp index for the next unloaded
snapshot segment. It can throw when only one unloaded segment remains or select
a merge window using a later segment's timestamp.
Modifications
MAX_MERGE_NUM.segment, and merge-window timestamp selection.
Verifying this change
BucketDelayedDeliveryTrackerTestmerge, segment, and trimtests with
:pulsar-broker:test -PtestRetryCount=0.:pulsar-broker:checkstyleMain :pulsar-broker:checkstyleTest.Does this pull request potentially affect one of the following parts: