You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "void-ptr974 (via GitHub)" <gi...@apache.org> on 2026/07/25 06:15:26 UTC

[PR] [fix][broker] Fix delayed-delivery bucket merge failures when delayedDeliveryMaxNumBuckets is 1-3 [pulsar]

void-ptr974 opened a new pull request, #26242:
URL: https://github.com/apache/pulsar/pull/26242

   Fixes #26241
   
   ### Motivation
   
   When `delayedDeliveryMaxNumBuckets` is set to `1`, `2`, or `3`, the first
   bucket-limit overflow contains `2`, `3`, or `4` immutable buckets. The merge
   selector 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
   
   - Select up to the available number of buckets, bounded by `MAX_MERGE_NUM`.
   - Preserve the existing preference for the largest eligible merge group.
   - Use the zero-based timestamp index for the next unloaded snapshot segment.
   - Add regression tests for small bucket limits, a single remaining unloaded
     segment, and merge-window timestamp selection.
   
   ### Verifying this change
   
   - [x] Ran focused `BucketDelayedDeliveryTrackerTest` merge, segment, and trim
     tests with `:pulsar-broker:test -PtestRetryCount=0`.
   - [x] Ran `:pulsar-broker:checkstyleMain :pulsar-broker:checkstyleTest`.
   
   ### Does this pull request potentially affect one of the following parts:
   
   - [ ] Dependencies (add or upgrade a dependency)
   - [ ] The public API
   - [ ] The schema
   - [ ] The default values of configurations
   - [ ] The threading model
   - [ ] The binary protocol
   - [ ] The REST endpoints
   - [ ] The admin CLI options
   - [ ] The metrics
   - [ ] Anything that affects deployment
   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [fix][broker] Fix delayed-delivery bucket merge failures when delayedDeliveryMaxNumBuckets is 1-3 [pulsar]

Posted by "nodece (via GitHub)" <gi...@apache.org>.
nodece merged PR #26242:
URL: https://github.com/apache/pulsar/pull/26242


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [fix][broker] Fix delayed-delivery bucket merge failures when delayedDeliveryMaxNumBuckets is 1-3 [pulsar]

Posted by "nodece (via GitHub)" <gi...@apache.org>.
nodece commented on PR #26242:
URL: https://github.com/apache/pulsar/pull/26242#issuecomment-5101146737

   @void-ptr974 Please check conflicts.


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org