diff options
| author | Dan Engelbrecht <[email protected]> | 2025-09-26 17:01:18 +0200 |
|---|---|---|
| committer | GitHub Enterprise <[email protected]> | 2025-09-26 17:01:18 +0200 |
| commit | 1a79d480823af2b8c7bf1b46f7c2f5ab21ed45ad (patch) | |
| tree | a1170c36f46b9afabea40f375fed4c6faa1959b3 /src/zenstore/filecas.cpp | |
| parent | Make sure we call the previous terminate handle if present when we intercept ... (diff) | |
| download | zen-1a79d480823af2b8c7bf1b46f7c2f5ab21ed45ad.tar.xz zen-1a79d480823af2b8c7bf1b46f7c2f5ab21ed45ad.zip | |
more iterate chunk logging (#516)
* add log warnings when we can't read payloads in cas when we thing we should have them
* fix misleading option help
Diffstat (limited to 'src/zenstore/filecas.cpp')
| -rw-r--r-- | src/zenstore/filecas.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/zenstore/filecas.cpp b/src/zenstore/filecas.cpp index 365a933c1..103928097 100644 --- a/src/zenstore/filecas.cpp +++ b/src/zenstore/filecas.cpp @@ -656,6 +656,12 @@ FileCasStrategy::IterateChunks(std::span<IoHash> ChunkHashes, ZEN_ASSERT(ChunkIndex < ChunkHashes.size()); const IoHash& ChunkHash = ChunkHashes[ChunkIndex]; IoBuffer Payload = SafeOpenChunk(ChunkHash, ExpectedSize); + if (!Payload) + { + ShardingHelper Name(m_RootDirectory, ChunkHash); + const std::filesystem::path ChunkPath = Name.ShardedPath.ToPath(); + ZEN_WARN("Failed to fetch chunk {} from '{}', Size {}", ChunkHash, ChunkPath, ExpectedSize); + } if (!AsyncCallback(ChunkIndex, std::move(Payload))) { return false; @@ -754,6 +760,12 @@ FileCasStrategy::IterateChunks(std::function<void(const IoHash& Hash, IoBuffer&& const IoHash& ChunkHash = RawHashes[Index]; const uint64_t ExpectedSize = ExpectedSizes[Index]; IoBuffer Payload = SafeOpenChunk(ChunkHash, ExpectedSize); + if (!Payload) + { + ShardingHelper Name(m_RootDirectory, ChunkHash); + const std::filesystem::path ChunkPath = Name.ShardedPath.ToPath(); + ZEN_WARN("Failed to fetch chunk {} from '{}', Size {}", ChunkHash, ChunkPath, ExpectedSize); + } Callback(ChunkHash, std::move(Payload)); } } |