You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "Shawyeok (via GitHub)" <gi...@apache.org> on 2026/02/02 15:38:41 UTC

[PR] [improve][broker] Change log level from warn to debug when cursor mark-deleted position ledger doesn't exist [pulsar]

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

   <!--
   ### Contribution Checklist
     
     - PR title format should be *[type][component] summary*. For details, see *[Guideline - Pulsar PR Naming Convention](https://pulsar.apache.org/contribute/develop-semantic-title/)*. 
   
     - Fill out the template below to describe the changes contributed by the pull request. That will give reviewers the context they need to do the review.
     
     - Each pull request should address only one issue, not mix up code from multiple issues.
     
     - Each commit in the pull request has a meaningful commit message
   
     - Once all items of the checklist are addressed, remove the above text and this checklist, leaving only the filled out template below.
   -->
   
   ### Motivation
   
   Fixes #20408
   
   It's possible that the ledger at the mark-deleted position is empty and has been deleted already. This is not an error condition, so it should be logged at debug level instead of warn level to reduce noise in production logs.
   
   ### Verifying this change
   
   - [x] Make sure that the change passes the CI checks.
   
   This change is a trivial rework / code cleanup without any test coverage.
   
   ### Does this pull request potentially affect one of the following parts:
   
   <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
   
   *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
   
   ### Documentation
   
   <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
   
   - [ ] `doc` <!-- Your PR contains doc changes. -->
   - [ ] `doc-required` <!-- Your PR changes impact docs and you will update later -->
   - [x] `doc-not-needed` <!-- Your PR changes do not impact docs -->
   - [ ] `doc-complete` <!-- Docs have been already added -->
   
   ### Matching PR in forked repository
   
   PR in forked repository: <!-- ENTER URL HERE -->
   
   <!--
   After opening this PR, the build in apache/pulsar will fail and instructions will
   be provided for opening a PR in the PR author's forked repository.
   
   apache/pulsar pull requests should be first tested in your own fork since the 
   apache/pulsar CI based on GitHub Actions has constrained resources and quota.
   GitHub Actions provides separate quota for pull requests that are executed in 
   a forked repository.
   
   The tests will be run in the forked repository until all PR review comments have
   been handled, the tests pass and the PR is approved by a reviewer.
   -->
   


-- 
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] [improve][broker] Change log level from warn to debug when cursor mark-deleted position ledger doesn't exist [pulsar]

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


-- 
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] [improve][broker] Change log level from warn to debug when cursor mark-deleted position ledger doesn't exist [pulsar]

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

   > It's possible that the ledger at the mark-deleted position is empty and has been deleted already. 
   
   I'm wondering if the fix in this PR is reasonable: https://github.com/apache/pulsar/pull/25117. The goal is to keep the ledger data and the mark-deleted position consistent, thereby eliminating similar warning logs.
   


-- 
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] [improve][broker] Change log level from warn to debug when cursor mark-deleted position ledger doesn't exist [pulsar]

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

   > I'm wondering if the fix in this PR is reasonable: https://github.com/apache/pulsar/pull/25117. The goal is to keep the ledger data and the mark-deleted position consistent, thereby eliminating similar warning logs.
   > 
   > 
   
   @oneby-wang 
   
   IMO, we should only change the mark-deleted position of a cursor when there's an actual user acknowledgment. Here's why:
   
   - If the mark-deleted position changes from 1000:-1 to 1100:-1 just to stay consistent with the managed ledger's ledger list, we lose visibility into whether any real acknowledgments occurred during that period. Keeping the mark-deleted position as-is preserves that information — we can tell that no messages were actually acknowledged.
   
   - I don't see a clear benefit from enforcing this consistency. The managed ledger's ledger list is a `ConcurrentSkipListMap`, which handles lookups for the lowest bound greater than the mark-deleted position just fine.


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