diff options
| author | Dan Engelbrecht <[email protected]> | 2022-09-30 09:39:57 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-09-30 00:39:57 -0700 |
| commit | bc403bc3e3707c08a828273c971d6fb0dbd75197 (patch) | |
| tree | 63c20827d3604f131c71a6acfbd8746e98058ffa | |
| parent | Format all rpc package responses using `FormatPackageMessageBuffer` to avoid ... (diff) | |
| download | zen-bc403bc3e3707c08a828273c971d6fb0dbd75197.tar.xz zen-bc403bc3e3707c08a828273c971d6fb0dbd75197.zip | |
Use bucket/key to get inline value in upstream for chunks without a chunkid (#176)
| -rw-r--r-- | CHANGELOG.md | 1 | ||||
| -rw-r--r-- | zenserver/upstream/upstreamcache.cpp | 9 |
2 files changed, 7 insertions, 3 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 9ae0116d9..79d125d10 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ - Improvement: Improved message indicating no GC is scheduled - Improvement: Implement proper GetCacheValues upstream path - Improvement: Demote a number of ZEN_ERROR log calls for problems that are recoverable and handled +- Bugfix: Use bucket/key to get inline value in upstream for chunks without a chunkid - Bugfix: Fixed issue in CbPackage marshaling of local reference - Bugfix: Fix crash when switching Zen upstream configured via DNS when one endpoint becomes unresposive - Bugfix: Fixed issue where projects would not be discovered via DiscoverProjects due to use of stem() vs filename() diff --git a/zenserver/upstream/upstreamcache.cpp b/zenserver/upstream/upstreamcache.cpp index 610946385..ac75285c7 100644 --- a/zenserver/upstream/upstreamcache.cpp +++ b/zenserver/upstream/upstreamcache.cpp @@ -404,9 +404,12 @@ namespace detail { if (!Result.Error) { std::string_view BlobStoreNamespace = GetActualBlobStoreNamespace(Session, Namespace); - const CloudCacheResult BlobResult = Session.GetCompressedBlob(BlobStoreNamespace, Request.ChunkId); - ElapsedSeconds = BlobResult.ElapsedSeconds; - Payload = BlobResult.Response; + const CloudCacheResult BlobResult = + Request.ChunkId == IoHash::Zero + ? Session.GetInlineBlob(BlobStoreNamespace, Request.Key.Bucket, Request.Key.Hash, Request.ChunkId) + : Session.GetCompressedBlob(BlobStoreNamespace, Request.ChunkId); + ElapsedSeconds = BlobResult.ElapsedSeconds; + Payload = BlobResult.Response; AppendResult(BlobResult, Result); |