Skip to content

[fix][broker] Fix compaction cursor reset may lose mark-delete properties#36

Closed
oneby-wang wants to merge 2 commits into
masterfrom
reset_curosr_mark_delete_properties
Closed

[fix][broker] Fix compaction cursor reset may lose mark-delete properties#36
oneby-wang wants to merge 2 commits into
masterfrom
reset_curosr_mark_delete_properties

Conversation

@oneby-wang

@oneby-wang oneby-wang commented May 23, 2026

Copy link
Copy Markdown
Owner

Motivation

This is a follow-up to apache#25165, apache#25796, and apache#25803 for the same class of mark-delete properties race condition, covering ManagedCursorImpl.internalResetCursor() for the compaction cursor.

ManagedCursorImpl.internalResetCursor() may lose compaction cursor mark-delete properties in a race condition.

When compaction cursor reset persists a mark-delete position while another asyncMarkDelete() call with properties is in progress, passing the cursor current properties can capture stale properties and later overwrite the compaction mark-delete properties, such as CompactedTopicLedger.

Modifications

  1. Add testCompactionCursorResetNeverLoseMarkDeleteProperties() test to reproduce the issue.
  2. Pass null to internalAsyncMarkDelete() for compaction cursor reset, so the cursor uses the latest properties when the mark-delete is applied.
  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

@oneby-wang oneby-wang marked this pull request as ready for review May 23, 2026 06:18
@oneby-wang oneby-wang changed the title [fix][ml] Fix compaction cursor reset may lose mark-delete properties [fix][broker] Fix compaction cursor reset may lose mark-delete properties May 23, 2026
@oneby-wang oneby-wang closed this May 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant