Open
Description
BUG REPORT
Describe the bug
Appening to a ledger from different threads leads to high contention on the metadataLock object
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