aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2024-03-22 10:00:05 +0100
committerGitHub Enterprise <[email protected]>2024-03-22 10:00:05 +0100
commit98f71c24b20692e2b1c597ee76a66fb0adaf0683 (patch)
treef29cea891cc2b38a5bdad1141b9cd8cae1665157
parentEdit action name for brevity (diff)
downloadzen-98f71c24b20692e2b1c597ee76a66fb0adaf0683.tar.xz
zen-98f71c24b20692e2b1c597ee76a66fb0adaf0683.zip
disable partial getcachechunk responses (#19)
-rw-r--r--CHANGELOG.md1
-rw-r--r--src/zenstore/cache/cacherpc.cpp8
2 files changed, 7 insertions, 2 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5bd4fc89d..f96b026ec 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,7 +8,6 @@
- Bugfix: Use TemporaryFile and MoveTemporaryIntoPlace to avoid leaving partial files on error
- Bugfix: Install Ctrl+C handler earlier when doing `zen oplog-export` and `zen oplog-export` to properly cancel jobs
- Feature: Added option `--access-token-path` to `zen oplog-export` and `zen-oplog-import` enabling it to read a cloud access token from a json file
-- Feature: Structured cache RPC call GetCacheChunks can now respond with partial chunks. Requires the accept flag kAllowPartialCacheChunks to be set in the request
- Improvement: Add ability to block a set of CAS entries from GC in project store
- Improvement: Httpasio explicitly close acceptor sockets
- Improvement: Httpasio add retry for desired port
diff --git a/src/zenstore/cache/cacherpc.cpp b/src/zenstore/cache/cacherpc.cpp
index 27bc4b016..84ca5c5e3 100644
--- a/src/zenstore/cache/cacherpc.cpp
+++ b/src/zenstore/cache/cacherpc.cpp
@@ -1549,7 +1549,13 @@ CacheRpcHandler::WriteGetCacheChunksResponse([[maybe_unused]] const CacheRequest
using namespace cache::detail;
- const bool AcceptsPartialChunks = EnumHasAnyFlags(AcceptOptions, RpcAcceptOptions::kAllowPartialCacheChunks);
+ const bool AcceptsPartialChunks = EnumHasAnyFlags(AcceptOptions, RpcAcceptOptions::kAllowPartialCacheChunks) && false;
+ // TODO: We need to redesign how we respond with partial chunks as we can get requests for multiple parts of the same chunk
+ // and we currently identify chunks by the full chunks RawHash making it impossible to distinguish between sections for partial chunks.
+ // Also, UE currently does the lookup by checking the RawHash *inside* the attachment which will break as sections of compressed
+ // buffers has a RawHash of zero (as we don't want to re-hash the section)
+ // zen side handles this as it separates the lookup hash from the hash inside the attachment, but it still can't tell two partial
+ // section from the same chunk apart.
CbPackage RpcResponse;
CbObjectWriter Writer;