aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2023-10-27 12:38:57 +0200
committerGitHub <[email protected]>2023-10-27 12:38:57 +0200
commitdf569c783a23e2d4195c7205256a190d4f4b92c7 (patch)
treea345260f76b2322350c58ef2e131eb75fe425b81
parentfix CacheBucket::CollectGarbage removing standalone entries without an exclus... (diff)
downloadzen-df569c783a23e2d4195c7205256a190d4f4b92c7.tar.xz
zen-df569c783a23e2d4195c7205256a190d4f4b92c7.zip
fixed missing context for cache record PUT operations (#503)
-rw-r--r--CHANGELOG.md1
-rw-r--r--src/zenserver/cache/httpstructuredcache.cpp8
2 files changed, 7 insertions, 2 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index ff8f0a4e7..769fd69f9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,7 @@
##
- Bugfix: Block sending error reports from sentry_sink to Sentry unless the log is actually an error log
- Bugfix: Make sure we have an exclusive lock in CacheBucket::CollectGarbage when removing standalone entries from the index
+- Bugfix: Fixed problem with missing session/request context in cache record PUT operations
## 0.2.29
- Feature: Add `skipdelete` parameter to `admin/gc` endpoint to do a dry run of GC
diff --git a/src/zenserver/cache/httpstructuredcache.cpp b/src/zenserver/cache/httpstructuredcache.cpp
index d8bc00c03..8db96f914 100644
--- a/src/zenserver/cache/httpstructuredcache.cpp
+++ b/src/zenserver/cache/httpstructuredcache.cpp
@@ -1860,7 +1860,7 @@ HttpStructuredCacheService::HandleRpcRequest(HttpServerRequest& Request)
}
CbPackage
-HttpStructuredCacheService::HandleRpcPutCacheRecords([[maybe_unused]] const CacheRequestContext& Context, const CbPackage& BatchRequest)
+HttpStructuredCacheService::HandleRpcPutCacheRecords(const CacheRequestContext& Context, const CbPackage& BatchRequest)
{
ZEN_TRACE_CPU("Z$::RpcPutCacheRecords");
@@ -1896,7 +1896,11 @@ HttpStructuredCacheService::HandleRpcPutCacheRecords([[maybe_unused]] const Cach
return CbPackage{};
}
CacheRecordPolicy Policy = LoadCacheRecordPolicy(RequestObject["Policy"sv].AsObjectView(), DefaultPolicy);
- PutRequestData PutRequest{*Namespace, std::move(Key), RecordObject, std::move(Policy)};
+ PutRequestData PutRequest{.Namespace = *Namespace,
+ .Key = std::move(Key),
+ .RecordObject = RecordObject,
+ .Policy = std::move(Policy),
+ .Context = Context};
PutResult Result = PutCacheRecord(PutRequest, &BatchRequest);