Skip to content

Conversation

@oneby-wang
Copy link
Contributor

@oneby-wang oneby-wang commented Jan 20, 2026

Motivation

ManagedCursorImpl.asyncDelete() method may lose previous async mark delete properties in race condition.

Modifications

  1. Add testAsyncDeleteNeverLoseMarkDeleteProperties() test to reproduce the issue.
  2. Pass null to internalAsyncMarkDelete() method's properties param in asyncDelete() method, which depends on [fix][broker] Fix markDeletedPosition race condition in ManagedLedgerImpl.maybeUpdateCursorBeforeTrimmingConsumedLedger() method #25110.
  3. Run test to verify the code change.

Verifying this change

  • Make sure that the change passes the CI checks.

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

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

Matching PR in forked repository

PR in forked repository: oneby-wang#25

@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Jan 20, 2026
@lhotari lhotari added this to the 4.2.0 milestone Jan 20, 2026
@lhotari
Copy link
Member

lhotari commented Jan 20, 2026

Depends on #25110

Copy link
Member

@lhotari lhotari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Good catch @oneby-wang . Please update the description to contain the detail that this PR depends on #25110.

@oneby-wang
Copy link
Contributor Author

@lhotari PR description updated.

Some more places need further working:

  1. ManagedLedgerImpl.advanceCursorsIfNecessary()
  2. PersistentMessageExpiryMonitor.findEntryComplete()
  3. ManagedCursorImpl.internalResetCursor()

I will address the three above references in separate PRs. First, I will write test cases to reproduce the issue, then fix it using the approach referenced in this PR.

Please kick me if I miss something.

image image

@lhotari
Copy link
Member

lhotari commented Jan 20, 2026

/pulsarbot rerun-failure-checks

@oneby-wang
Copy link
Contributor Author

ExtensibleLoadManagerImplTest in the flaky test suite always fails no matter how many times I rerun it in my personal CI(with or without this PR).

https://github.com/oneby-wang/pulsar/actions/runs/21156674861/job/60853773530?pr=25

https://github.com/oneby-wang/pulsar/actions/runs/21158046247/job/60853358807?pr=11

Seems some code changes break this flaky test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc-not-needed Your PR changes do not impact docs release/4.0.9 release/4.1.3

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants