From 25985163796ba45b028b40662146e44e8eff47a8 Mon Sep 17 00:00:00 2001 From: zousar <2936246+zousar@users.noreply.github.com> Date: Mon, 24 Mar 2025 23:30:03 -0600 Subject: Establish TODOs and unit test for rejected PUT propagation --- src/zenserver/cache/httpstructuredcache.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/zenserver/cache/httpstructuredcache.cpp') diff --git a/src/zenserver/cache/httpstructuredcache.cpp b/src/zenserver/cache/httpstructuredcache.cpp index d5dd28f68..932e456d2 100644 --- a/src/zenserver/cache/httpstructuredcache.cpp +++ b/src/zenserver/cache/httpstructuredcache.cpp @@ -1233,6 +1233,7 @@ HttpStructuredCacheService::HandlePutCacheRecord(HttpServerRequest& Request, con RawHash = IoHash::HashBuffer(SharedBuffer(Body)); } const bool Overwrite = !EnumHasAllFlags(PolicyFromUrl, CachePolicy::QueryLocal); + // TODO: Propagation for rejected PUTs if (!m_CacheStore.Put(RequestContext, Ref.Namespace, Ref.BucketSegment, @@ -1294,6 +1295,7 @@ HttpStructuredCacheService::HandlePutCacheRecord(HttpServerRequest& Request, con const bool Overwrite = !EnumHasAllFlags(PolicyFromUrl, CachePolicy::QueryLocal); + // TODO: Propagation for rejected PUTs if (!m_CacheStore.Put(RequestContext, Ref.Namespace, Ref.BucketSegment, @@ -1402,6 +1404,7 @@ HttpStructuredCacheService::HandlePutCacheRecord(HttpServerRequest& Request, con ZenCacheValue CacheValue; CacheValue.Value = CacheRecord.GetBuffer().AsIoBuffer(); CacheValue.Value.SetContentType(ZenContentType::kCbObject); + // TODO: Propagation for rejected PUTs if (!m_CacheStore.Put(RequestContext, Ref.Namespace, Ref.BucketSegment, Ref.HashKey, CacheValue, ReferencedAttachments, Overwrite)) { return Request.WriteResponse(HttpResponseCode::Conflict); -- cgit v1.2.3