From 57c5be6e86cce8a387a4652ba64c41f649979194 Mon Sep 17 00:00:00 2001 From: Dan Engelbrecht Date: Fri, 3 Jun 2022 17:40:55 +0200 Subject: Don't hold index lock while reading standalone values Can cause deadlock --- zenserver/cache/structuredcachestore.cpp | 2 ++ 1 file changed, 2 insertions(+) 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; -- cgit v1.2.3