mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-08-25 04:48:43 +08:00
lock instead of RLock, to prevent racing condition
https://github.com/seaweedfs/seaweedfs/discussions/5432#discussioncomment-8933608
This commit is contained in:
parent
36fec34c47
commit
6aa804b368
@ -146,8 +146,8 @@ func (i *InodeToPath) HasPath(path util.FullPath) bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (i *InodeToPath) MarkChildrenCached(fullpath util.FullPath) {
|
func (i *InodeToPath) MarkChildrenCached(fullpath util.FullPath) {
|
||||||
i.RLock()
|
i.Lock()
|
||||||
defer i.RUnlock()
|
defer i.Unlock()
|
||||||
inode, found := i.path2inode[fullpath]
|
inode, found := i.path2inode[fullpath]
|
||||||
if !found {
|
if !found {
|
||||||
// https://github.com/seaweedfs/seaweedfs/issues/4968
|
// https://github.com/seaweedfs/seaweedfs/issues/4968
|
||||||
|
Loading…
Reference in New Issue
Block a user