Skip to content

Reduce metadataLock contention in LedgerHandle#4549

Merged
lhotari merged 1 commit intoapache:masterfrom
lifepuzzlefun:reduce_lock_contention
Apr 16, 2025
Merged

Reduce metadataLock contention in LedgerHandle#4549
lhotari merged 1 commit intoapache:masterfrom
lifepuzzlefun:reduce_lock_contention

Conversation

@lifepuzzlefun
Copy link
Contributor

@lifepuzzlefun lifepuzzlefun commented Jan 25, 2025

Descriptions of the changes in this PR:

Fix #4517

Motivation

we can move changeEnsembleLoop out side the metadataLock because the changing ensemble field can be a guard for do the action and the callback will trigger next.

Changes

(Describe: what changes you have made)


In order to uphold a high standard for quality for code contributions, Apache BookKeeper runs various precommit
checks for pull requests. A pull request can only be merged when it passes precommit checks.


Be sure to do all the following to help us incorporate your contribution
quickly and easily:

If this PR is a BookKeeper Proposal (BP):

  • Make sure the PR title is formatted like:
    <BP-#>: Description of bookkeeper proposal
    e.g. BP-1: 64 bits ledger is support
  • Attach the master issue link in the description of this PR.
  • Attach the google doc link if the BP is written in Google Doc.

Otherwise:

  • Make sure the PR title is formatted like:
    <Issue #>: Description of pull request
    e.g. Issue 123: Description ...
  • Make sure tests pass via mvn clean apache-rat:check install spotbugs:check.
  • Replace <Issue #> in the title with the actual Issue number.

Copy link
Contributor

@liangyepianzhou liangyepianzhou left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@StevenLuMT StevenLuMT left a comment

Choose a reason for hiding this comment

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

Good jobs

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

@lhotari lhotari added this to the 4.18.0 milestone Apr 16, 2025
@lhotari lhotari merged commit b10aec2 into apache:master Apr 16, 2025
23 checks passed
lhotari pushed a commit that referenced this pull request Apr 16, 2025
lhotari pushed a commit that referenced this pull request Apr 16, 2025
lhotari pushed a commit that referenced this pull request Apr 17, 2025
priyanshu-ctds pushed a commit to datastax/bookkeeper that referenced this pull request Jul 11, 2025
(cherry picked from commit b10aec2)
(cherry picked from commit ce56bb1)
sandeep-ctds pushed a commit to datastax/bookkeeper that referenced this pull request Jul 22, 2025
(cherry picked from commit b10aec2)
(cherry picked from commit ce56bb1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unnecessary contention on "metadataLock" in LedgerHandle while appending from different threads

5 participants

Comments