duongkame opened a new pull request, #4885: URL: https://github.com/apache/ozone/pull/4885
## What changes were proposed in this pull request? This PR aims to fix the performance bottleneck of `LockManager` in Ozone Manager. The solution is to replace `LockManager` with striped locks. Some implementation details in this PR: 1. We use Guava's [Stripe](https://guava.dev/releases/19.0/api/docs/com/google/common/util/concurrent/Striped.html) for striped locks. 2. Each resource type, e.g. BUCKET, VOLUME, KEY... has its own Striped. This prevents any collision cross-resource. 3. For composite keys like "$volume/$bucket/$key", I introduced a cheaper way, aka. CompositeKey, to avoid contaminating strings. And this eliminates the need for those the optimization of `hash` interfaces, e.g. `acquireWriteHashLock`. ## What is the link to the Apache JIRA https://issues.apache.org/jira/browse/HDDS-8765 ## How was this patch tested? CI, existing unit tests. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
