Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pool: Avoid lock contention when opening files and setting sticky flags
Motivation: To avoid races between the change notifications during file opening/setting sticky flags and repository initialization, the repository acquires an exclusive lock around the notification logic. This is a contention point when opening several files concurrently, in particular when opening the file requires reads from the meta DB. Modification: Replace the lock with a read write lock to allow open/set sticky operations to be executed concurrently. The patch is deliberately minimalistic to allow backporting to 2.13 and 2.14. Bigger changes may be made on master in separate patches. Result: Resolved lock contention when opening files or changing sticky flags on pools. Target: trunk Request: 2.14 Request: 2.13 Require-notes: yes Require-book: no Acked-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de> Patch: https://rb.dcache.org/r/8924/ (cherry picked from commit 0d9b3b1)
- Loading branch information
Showing
1 changed file
with
84 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters