From 7a94b22eafdbd3f394fb9200e713cbb3b2b0cd56 Mon Sep 17 00:00:00 2001 From: zousar Date: Fri, 19 Sep 2025 23:46:52 -0600 Subject: Change batch put responses for client reporting Conflicts are now treated as successes, and we optionally return a Details array instead of an ErrorMessages array. Details are returned for all requests in a batch, or no requests in a batch depending on whether there are any details to be shared about any of the put requests. The details for a conflict include the raw hash and raw size of the item. If the item is a record, we also include the record as an object. --- src/zenserver/cache/httpstructuredcache.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/zenserver/cache/httpstructuredcache.cpp') diff --git a/src/zenserver/cache/httpstructuredcache.cpp b/src/zenserver/cache/httpstructuredcache.cpp index c83065506..dc14465de 100644 --- a/src/zenserver/cache/httpstructuredcache.cpp +++ b/src/zenserver/cache/httpstructuredcache.cpp @@ -1221,8 +1221,11 @@ HttpStructuredCacheService::HandlePutCacheRecord(HttpServerRequest& Request, con break; } - return PutResult.Message.empty() ? Request.WriteResponse(ResponseCode) - : Request.WriteResponse(ResponseCode, zen::HttpContentType::kText, PutResult.Message); + if (PutResult.Details) + { + Request.WriteResponse(ResponseCode, PutResult.Details); + } + return Request.WriteResponse(ResponseCode); }; const HttpContentType ContentType = Request.RequestContentType(); -- cgit v1.2.3