de-couple walkMu and walkReadMu for some granularity (#13231)

This commit brings two locks instead of single lock for
WalkDir() calls on top of c25816eabc.

The main reason is to avoid contention between readMetadata()
and ListDir() calls, ListDir() can take time on prefixes that
are huge for readdir() but this shouldn't end up blocking
all readMetadata() operations, this allows for more room for
I/O while not overly penalizing all listing operations.
This commit is contained in:
Harshavardhana
2021-09-17 12:14:12 -07:00
committed by GitHub
parent 1fc0e9a6aa
commit 66fcd02aa2
2 changed files with 9 additions and 9 deletions

View File

@@ -142,7 +142,8 @@ type xlStorage struct {
sync.RWMutex
// mutex to prevent concurrent read operations overloading walks.
walkMu sync.Mutex
walkMu sync.Mutex
walkReadMu sync.Mutex
}
// checkPathLength - returns error if given path name length more than 255