aboutsummaryrefslogtreecommitdiff
path: root/zenserver/upstream/upstreamcache.cpp
diff options
context:
space:
mode:
authorPer Larsson <[email protected]>2021-11-11 11:37:31 +0100
committerPer Larsson <[email protected]>2021-11-11 11:37:31 +0100
commitefd0c3c0896c97c6cd37e6a6ac2edf331e5b4a3f (patch)
tree2141d45bf4fdb79bd4fc6f245775f4ec0651adfb /zenserver/upstream/upstreamcache.cpp
parentFormat and remove unused type. (diff)
downloadzen-efd0c3c0896c97c6cd37e6a6ac2edf331e5b4a3f.tar.xz
zen-efd0c3c0896c97c6cd37e6a6ac2edf331e5b4a3f.zip
Removed batch result.
Diffstat (limited to 'zenserver/upstream/upstreamcache.cpp')
-rw-r--r--zenserver/upstream/upstreamcache.cpp34
1 files changed, 19 insertions, 15 deletions
diff --git a/zenserver/upstream/upstreamcache.cpp b/zenserver/upstream/upstreamcache.cpp
index a221c7d8e..d5414daf1 100644
--- a/zenserver/upstream/upstreamcache.cpp
+++ b/zenserver/upstream/upstreamcache.cpp
@@ -144,10 +144,10 @@ namespace detail {
}
}
- virtual GetUpstreamCacheBatchResult GetCacheRecords(std::span<CacheKey> CacheKeys,
- std::span<size_t> KeyIndex,
- const CacheRecordPolicy& Policy,
- OnCacheRecordGetComplete&& OnComplete) override
+ virtual GetUpstreamCacheResult GetCacheRecords(std::span<CacheKey> CacheKeys,
+ std::span<size_t> KeyIndex,
+ const CacheRecordPolicy& Policy,
+ OnCacheRecordGetComplete&& OnComplete) override
{
ZEN_UNUSED(Policy);
@@ -161,7 +161,7 @@ namespace detail {
CbPackage Package;
CbObjectView Record;
- if (Result.Success)
+ if (Result.ErrorCode == 0)
{
const CbValidateError ValidationResult = ValidateCompactBinary(Result.Response, CbValidateMode::All);
if (ValidationResult == CbValidateError::None)
@@ -179,6 +179,10 @@ namespace detail {
});
}
}
+ else
+ {
+ m_HealthOk = false;
+ }
OnComplete({.CacheKey = CacheKey, .KeyIndex = Index, .Record = Record, .Package = Package});
}
@@ -213,9 +217,9 @@ namespace detail {
}
}
- virtual GetUpstreamCacheBatchResult GetCachePayloads(std::span<CacheChunkRequest> CacheChunkRequests,
- std::span<size_t> RequestIndex,
- OnCachePayloadGetComplete&& OnComplete) override final
+ virtual GetUpstreamCacheResult GetCachePayloads(std::span<CacheChunkRequest> CacheChunkRequests,
+ std::span<size_t> RequestIndex,
+ OnCachePayloadGetComplete&& OnComplete) override final
{
CloudCacheSession Session(m_Client);
@@ -511,10 +515,10 @@ namespace detail {
}
}
- virtual GetUpstreamCacheBatchResult GetCacheRecords(std::span<CacheKey> CacheKeys,
- std::span<size_t> KeyIndex,
- const CacheRecordPolicy& Policy,
- OnCacheRecordGetComplete&& OnComplete) override
+ virtual GetUpstreamCacheResult GetCacheRecords(std::span<CacheKey> CacheKeys,
+ std::span<size_t> KeyIndex,
+ const CacheRecordPolicy& Policy,
+ OnCacheRecordGetComplete&& OnComplete) override
{
std::vector<size_t> IndexMap;
IndexMap.reserve(KeyIndex.size());
@@ -606,9 +610,9 @@ namespace detail {
}
}
- virtual GetUpstreamCacheBatchResult GetCachePayloads(std::span<CacheChunkRequest> CacheChunkRequests,
- std::span<size_t> RequestIndex,
- OnCachePayloadGetComplete&& OnComplete) override final
+ virtual GetUpstreamCacheResult GetCachePayloads(std::span<CacheChunkRequest> CacheChunkRequests,
+ std::span<size_t> RequestIndex,
+ OnCachePayloadGetComplete&& OnComplete) override final
{
std::vector<size_t> IndexMap;
IndexMap.reserve(RequestIndex.size());