You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "Denovo1998 (via GitHub)" <gi...@apache.org> on 2026/10/14 13:42:33 UTC

[PR] [fix][client] Prevent chunk message ID leaks after seek [pulsar]

Denovo1998 opened a new pull request, #26909:
URL: https://github.com/apache/pulsar/pull/26909

   Follow-up to #26726.
   
   ### Motivation
   
   `ConsumerImpl.messageReceived()` records the chunk-ID sequence of an assembled message before applying the seek boundary filter. A filtered message is not delivered to the application, so a newly created mapping has no normal acknowledgment path to remove it. Repeated exclusive seeks to different chunked messages therefore accumulate mappings in `unAckedChunkedMessageIdSequenceMap`.
   
   ### Modifications
   
   - Keep assembled chunk IDs local and register them only after the message passes the start-message filter.
   - Preserve existing mappings for messages delivered before the seek that the application has not acknowledged yet.
   - Add broker/client regression coverage for repeated exclusive and inclusive seeks, acknowledgment cleanup, and previously delivered but unacknowledged messages.
   
   ### Verifying this change
   
   - [x] Make sure that the change passes the CI checks.
   
   This change added tests and can be verified as follows:
   
   - Added `MessageChunkingTest.testRepeatedSeekDoesNotRetainFilteredChunkMessageIds`, covering both exclusive and inclusive seeks. Without the fix, four exclusive seeks leave four stale mappings, each containing three chunk IDs.
   - Verify delivered messages retain their chunk IDs until acknowledgment, including a message held by the application across an exclusive seek.
   - Run the new regression together with `MessageChunkingTest.testSeekChunkMessages` and `MessageChunkingTest.testLargeMessage`.
   
   Local validation on implementation base `be41491e7d9` on 2026-10-12: all seven selected test cases passed with retries disabled, and `./gradlew quickCheck` passed. These checks have not been rerun on the latest master.
   
   ### Does this pull request potentially affect one of the following parts:
   
   *If the box was checked, please highlight the changes*
   
   - [ ] 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][client] Prevent chunk message ID leaks after seek [pulsar]

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


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