aboutsummaryrefslogtreecommitdiff
path: root/zenserver/upstream/upstreamcache.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'zenserver/upstream/upstreamcache.cpp')
-rw-r--r--zenserver/upstream/upstreamcache.cpp20
1 files changed, 9 insertions, 11 deletions
diff --git a/zenserver/upstream/upstreamcache.cpp b/zenserver/upstream/upstreamcache.cpp
index 3d6641a4f..b0343a61b 100644
--- a/zenserver/upstream/upstreamcache.cpp
+++ b/zenserver/upstream/upstreamcache.cpp
@@ -378,7 +378,7 @@ namespace detail {
if (It == std::end(CacheRecord.PayloadIds))
{
- OutReason = fmt::format("payload '{}' MISSING from local cache", PayloadId);
+ OutReason = fmt::format("value '{}' MISSING from local cache", PayloadId);
return false;
}
@@ -394,7 +394,7 @@ namespace detail {
if (!BlobResult.Success)
{
- OutReason = fmt::format("upload payload '{}' FAILED, reason '{}'", PayloadId, BlobResult.Reason);
+ OutReason = fmt::format("upload value '{}' FAILED, reason '{}'", PayloadId, BlobResult.Reason);
return false;
}
@@ -473,7 +473,7 @@ namespace detail {
Sb << MissingHash.ToHexString() << ",";
}
- return {.Reason = fmt::format("finalize '{}/{}' FAILED, still needs payload(s) '{}'",
+ return {.Reason = fmt::format("finalize '{}/{}' FAILED, still needs value(s) '{}'",
CacheRecord.Key.Bucket,
CacheRecord.Key.Hash,
Sb.ToString()),
@@ -646,9 +646,8 @@ namespace detail {
}
BatchRequest.EndArray();
- BatchRequest.BeginObject("Policy"sv);
- CacheRecordPolicy::Save(Policy, BatchRequest);
- BatchRequest.EndObject();
+ BatchRequest.SetName("Policy"sv);
+ Policy.Save(BatchRequest);
}
BatchRequest.EndObject();
@@ -726,7 +725,7 @@ namespace detail {
CbObjectWriter BatchRequest;
BatchRequest << "Method"sv
- << "GetCachePayloads";
+ << "GetCacheValues";
BatchRequest.BeginObject("Params"sv);
{
@@ -743,12 +742,11 @@ namespace detail {
BatchRequest << "Bucket"sv << Request.Key.Bucket;
BatchRequest << "Hash"sv << Request.Key.Hash;
BatchRequest.EndObject();
-
- BatchRequest.AddObjectId("PayloadId"sv, Request.PayloadId);
+ BatchRequest.AddObjectId("ValueId"sv, Request.PayloadId);
BatchRequest << "ChunkId"sv << Request.ChunkId;
BatchRequest << "RawOffset"sv << Request.RawOffset;
BatchRequest << "RawSize"sv << Request.RawSize;
- BatchRequest << "Policy"sv << static_cast<uint32_t>(Request.Policy);
+ BatchRequest << "Policy"sv << WriteToString<128>(Request.Policy).ToView();
}
BatchRequest.EndObject();
}
@@ -828,7 +826,7 @@ namespace detail {
}
else
{
- return {.Reason = std::string("invalid payload buffer"), .Success = false};
+ return {.Reason = std::string("invalid value buffer"), .Success = false};
}
}