From cea1aee73ca453eb39b65bd4f8e53172b7ad2048 Mon Sep 17 00:00:00 2001 From: Andrew Wong Date: Thu, 27 Jul 2023 14:28:11 -0700 Subject: [PATCH] archival: promote some guardrail warnings to error They're scary when they happen because they indicate a bug in our logic. Let's promote to error to make sure we see them when they happen. --- src/v/cluster/archival_metadata_stm.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/v/cluster/archival_metadata_stm.cc b/src/v/cluster/archival_metadata_stm.cc index dc87d092f8e2..5846a3da491c 100644 --- a/src/v/cluster/archival_metadata_stm.cc +++ b/src/v/cluster/archival_metadata_stm.cc @@ -1002,7 +1002,7 @@ void archival_metadata_stm::apply_add_segment(const segment& segment) { if (!disable_safe_add && !_manifest->safe_segment_meta_to_add(meta)) { auto last = _manifest->last_segment(); vlog( - _logger.warn, + _logger.error, "Can't add segment: {}, previous segment: {}", meta, last); @@ -1029,7 +1029,7 @@ void archival_metadata_stm::apply_add_segment(const segment& segment) { // the hole. vlog( - _logger.warn, + _logger.error, "hole in the remote offset range detected! previous last " "offset: " "{}, new segment base offset: {}", @@ -1135,7 +1135,7 @@ void archival_metadata_stm::apply_spillover(const spillover_cmd& so) { get_start_offset(), get_last_offset()); } else { - vlog(_logger.warn, "Can't apply spillover_cmd: {}", so.manifest_meta); + vlog(_logger.error, "Can't apply spillover_cmd: {}", so.manifest_meta); } } @@ -1175,7 +1175,7 @@ archival_metadata_stm::get_segments_to_cleanup() const { // manifest in S3 so if we will delete it the data will be lost. if (m_name == s_name) { vlog( - _logger.warn, + _logger.error, "The replaced segment name {} collides with the segment {} " "in the manifest. It will be removed to prevent the data " "loss.",