diff options
| author | Dan Engelbrecht <[email protected]> | 2022-06-03 17:40:55 +0200 |
|---|---|---|
| committer | Dan Engelbrecht <[email protected]> | 2022-06-03 23:15:38 +0200 |
| commit | 57c5be6e86cce8a387a4652ba64c41f649979194 (patch) | |
| tree | 6c0fdbe1aee923b239bfa81af0a49b308e54bc02 /zenserver/cache/structuredcachestore.cpp | |
| parent | hardening of ZenCacheDiskLayer::CacheBucket::PutStandaloneCacheValue (diff) | |
| download | zen-57c5be6e86cce8a387a4652ba64c41f649979194.tar.xz zen-57c5be6e86cce8a387a4652ba64c41f649979194.zip | |
Don't hold index lock while reading standalone values
Can cause deadlock
Diffstat (limited to 'zenserver/cache/structuredcachestore.cpp')
| -rw-r--r-- | zenserver/cache/structuredcachestore.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/zenserver/cache/structuredcachestore.cpp b/zenserver/cache/structuredcachestore.cpp index e46f540cf..bc60a1d26 100644 --- a/zenserver/cache/structuredcachestore.cpp +++ b/zenserver/cache/structuredcachestore.cpp @@ -1440,6 +1440,8 @@ ZenCacheDiskLayer::CacheBucket::GatherReferences(GcContext& GcCtx) }); if (Loc.IsFlagSet(DiskLocation::kStandaloneFile)) { + // We don't need to hold the index lock when we read a standalone file + __.ReleaseNow(); if (!GetStandaloneCacheValue(Loc, Key, CacheValue)) { continue; |