From f9a046a50047d0e4294b96577ab7d8d289bdddf0 Mon Sep 17 00:00:00 2001 From: Andrea Barbadoro Date: Tue, 21 Nov 2023 17:24:34 +0100 Subject: [PATCH] partition_manifest: error log whole manifest file path when an error log happens, instead of _ntp log the whole cloud storage object key, so it's easier to manually retrieve the file (cherry picked from commit 141192fd707cd5752ca6fa2ad03647cb8d4ab0bc) --- src/v/cloud_storage/partition_manifest.cc | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/v/cloud_storage/partition_manifest.cc b/src/v/cloud_storage/partition_manifest.cc index 85b89df4e6ec1..abf144a71b516 100644 --- a/src/v/cloud_storage/partition_manifest.cc +++ b/src/v/cloud_storage/partition_manifest.cc @@ -649,7 +649,7 @@ void partition_manifest::set_archive_clean_offset( "{} Requested to advance archive_clean_offset to {} which is greater " "than the current archive_start_offset {}. The offset won't be " "changed. Archive size won't be changed by {} bytes.", - _ntp, + get_manifest_path(), start_rp_offset, _archive_start_offset, size_bytes); @@ -673,7 +673,7 @@ void partition_manifest::set_archive_clean_offset( "{} archive clean offset moved to {} but the archive size can't " "be updated because current size {} is smaller than the update " "{}. This needs to be reported and investigated.", - _ntp, + get_manifest_path(), _archive_clean_offset, _archive_size_bytes, size_bytes); @@ -789,7 +789,7 @@ bool partition_manifest::advance_start_offset(model::offset new_start_offset) { cst_log.error, "Previous start offset is not within segment in " "manifest for {}: previous_start_offset={}", - _ntp, + get_manifest_path(), previous_start_offset); previous_head_segment = _segments.begin(); } @@ -1061,7 +1061,7 @@ size_t partition_manifest::safe_segment_meta_to_add( "[{}] New segment does not line up with last offset of empty " "log: " "last_offset: {}, new_segment: {}", - _ntp, + get_manifest_path(), subst.last_offset, m); break; @@ -1106,7 +1106,7 @@ size_t partition_manifest::safe_segment_meta_to_add( cst_log.error, "[{}] New segment does not line up with previous " "segment: {}", - _ntp, + get_manifest_path(), format_seg_meta_anomalies(anomalies)); break; } @@ -1132,7 +1132,7 @@ size_t partition_manifest::safe_segment_meta_to_add( "[{}] New replacement segment does not line up with " "previous " "segment: {}", - _ntp, + get_manifest_path(), format_seg_meta_anomalies(anomalies)); break; } @@ -1147,7 +1147,7 @@ size_t partition_manifest::safe_segment_meta_to_add( "[{}] New replacement segment has the same size as " "replaced " "segment: new_segment: {}, replaced_segment: {}", - _ntp, + get_manifest_path(), m, *it); break; @@ -1177,7 +1177,7 @@ size_t partition_manifest::safe_segment_meta_to_add( "committed " "offset of " "any previous segment: new_segment: {}", - _ntp, + get_manifest_path(), m); break; } @@ -1292,9 +1292,9 @@ void partition_manifest::spillover(const segment_meta& spillover_meta) { if (expected_meta != spillover_meta) { vlog( cst_log.error, - "{} Expected spillover metadata {} doesn't match actual spillover " + "[{}] Expected spillover metadata {} doesn't match actual spillover " "metadata {}", - _ntp, + get_manifest_path(), expected_meta, spillover_meta); } else {