aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2025-09-25 14:45:16 +0200
committerDan Engelbrecht <[email protected]>2025-09-25 14:45:16 +0200
commit6ef5691f7558128dd2cf2706f8792dfd6dd8d8e7 (patch)
tree64e7dbfb9ad6799011e3938d6be38e55027c94a7
parent5.7.2-pre2 (diff)
downloadzen-de/add-verbose-logging-on-missing-blocks.tar.xz
zen-de/add-verbose-logging-on-missing-blocks.zip
list missing block hashes when --verbose is enabledde/add-verbose-logging-on-missing-blocks
-rw-r--r--CHANGELOG.md1
-rw-r--r--src/zen/cmds/builds_cmd.cpp14
2 files changed, 15 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index b3ac2d9a7..42f03cc61 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -44,6 +44,7 @@
- Improvement: Faster oplog import due to chunk existance check improvement
- Improvement: Cancelling oplog import is now more responsive during initial phase
- Improvement: Chunk block generation for `zen oplog-export` and `zen builds upload` command are now limited to max 4000 chunks per block
+- Improvement: If blocks metadata is missing for a download `--verbose` will enable output of all the missing chunk block hashes
- Feature: Options `--allow-partial-block-requests` for `zen builds download` command has been augmented with two new modes, `zencacheonly` and `mixed`. Defaults to `mixed`.
- `false` only full block requests allowed
- `mixed` multiple partial block ranges requests per block allowed to zen cache, single partial block range request per block to host
diff --git a/src/zen/cmds/builds_cmd.cpp b/src/zen/cmds/builds_cmd.cpp
index fee2adaee..4ad5d2b15 100644
--- a/src/zen/cmds/builds_cmd.cpp
+++ b/src/zen/cmds/builds_cmd.cpp
@@ -9051,6 +9051,20 @@ namespace {
std::string ErrorDescription =
fmt::format("All required blocks could not be found, {} blocks does not have metadata in this context.",
BlockRawHashes.size() - OutBlockDescriptions.size());
+ if (IsVerbose)
+ {
+ for (const IoHash& BlockHash : BlockRawHashes)
+ {
+ if (auto It = std::find_if(
+ OutBlockDescriptions.begin(),
+ OutBlockDescriptions.end(),
+ [BlockHash](const ChunkBlockDescription& Description) { return Description.BlockHash == BlockHash; });
+ It == OutBlockDescriptions.end())
+ {
+ ErrorDescription += fmt::format("\n {}", BlockHash);
+ }
+ }
+ }
if (AttemptFallback)
{
ZEN_CONSOLE_WARN("{} Attemping fallback options.", ErrorDescription);