Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
eolivelli opened this issue Oct 19, 2024 · 0 comments

Comments

@eolivelli
Copy link
Contributor

BUG REPORT

Describe the bug

Appening to a ledger from different threads leads to high contention on the metadataLock object

image

I suggest to switch to some form for ReentrantReadWriteLock and distinguish the cases in which there is only readOnly access to the critical sections guarded by the lock, especially on the happy paths (no bookies failures)

To Reproduce

I cannot share my reprorucer but the flame graph is pretty clear.

Expected behavior

Happending to a Ledger from multipple threads should lead to less contention.

Additional context

Using latest BK client 4.17.1

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

No branches or pull requests

1 participant