diff options
| author | Dan Engelbrecht <[email protected]> | 2023-12-05 16:21:47 -0500 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-12-05 22:21:47 +0100 |
| commit | 4aa1b4d6e3312e72952d26ccd702209e7051e258 (patch) | |
| tree | 10f16efcce8c8a404c937f0c47f7bde523fcd64c | |
| parent | http plugin dependency fixes (#590) (diff) | |
| download | zen-4aa1b4d6e3312e72952d26ccd702209e7051e258.tar.xz zen-4aa1b4d6e3312e72952d26ccd702209e7051e258.zip | |
Use correct iterator index when looking up memcached payload in GatherReferences (#591)
* Use correct iterator index when looking up memcached payload in gatherreferences
| -rw-r--r-- | CHANGELOG.md | 1 | ||||
| -rw-r--r-- | src/zenserver/cache/cachedisklayer.cpp | 9 |
2 files changed, 5 insertions, 5 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index c3e38c59f..f0464fc8f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ - `smallobjects`, `skipcid`, `skipdelete`, `verbose` - Bugfix: fixed file log timestamp format so the milliseconds are appended after the time not the date - Bugfix: Shut down thread pools earlier so worker threads have a chance to terminate before main thread calls `atexit()` +- Bugfix: Use correct lookup index when checking for memcached buffer when finding references in diskcache GC - Improvement: The frontend html content is no longer appended at the end of the executable which prevented signing, instead it is compiled in from the `/src/zenserver/frontend/html.zip` archive - Improvement: MacOS now does ad-hoc code signing by default when issuing `xmake bundle`, signing with proper cert is done on CI builds - Improvement: Updated branding to be consistent with current working name ("Unreal Zen Storage Server" etc) diff --git a/src/zenserver/cache/cachedisklayer.cpp b/src/zenserver/cache/cachedisklayer.cpp index a4a37b0af..700529443 100644 --- a/src/zenserver/cache/cachedisklayer.cpp +++ b/src/zenserver/cache/cachedisklayer.cpp @@ -1954,10 +1954,9 @@ ZenCacheDiskLayer::CacheBucket::GatherReferences(GcContext& GcCtx) for (const auto& Entry : StructuredItemsWithUnknownAttachments) { - const IoHash& Key = Entry.first; - size_t PayloadIndex = Entry.second; - BucketPayload& Payload = Payloads[PayloadIndex]; - const DiskLocation& Loc = Payload.Location; + const IoHash& Key = Entry.first; + BucketPayload& Payload = Payloads[Entry.second]; + const DiskLocation& Loc = Payload.Location; { IoBuffer Buffer; if (Loc.IsFlagSet(DiskLocation::kStandaloneFile)) @@ -1980,7 +1979,7 @@ ZenCacheDiskLayer::CacheBucket::GatherReferences(GcContext& GcCtx) #endif // CALCULATE_BLOCKING_TIME if (auto It = m_Index.find(Key); It != m_Index.end()) { - const BucketPayload& CachedPayload = Payloads[PayloadIndex]; + const BucketPayload& CachedPayload = Payloads[It->second]; if (CachedPayload.MemCached) { Buffer = m_MemCachedPayloads[CachedPayload.MemCached]; |