From 399406b97f21b142ec3603652895a0b54baa626b Mon Sep 17 00:00:00 2001 From: Andrea Barbadoro Date: Thu, 25 Jan 2024 16:08:04 +0100 Subject: [PATCH] cloud_storage/async_manifest_view: remove redundant call to in_stm prev if block is a bouncer condition in the form if(is_stm(q)) so it's assured (!in_stm(q)) (cherry picked from commit ecc24d216f252c8ce5eb743f658b6511a44dcc58) --- src/v/cloud_storage/async_manifest_view.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/v/cloud_storage/async_manifest_view.cc b/src/v/cloud_storage/async_manifest_view.cc index 8390cb9f1a05c..d103c410e9d4b 100644 --- a/src/v/cloud_storage/async_manifest_view.cc +++ b/src/v/cloud_storage/async_manifest_view.cc @@ -1297,8 +1297,9 @@ async_manifest_view::get_materialized_manifest( // Fast path for STM reads co_return std::ref(_stm_manifest); } + // query in not in the stm region if ( - !in_stm(q) && std::holds_alternative(q) + std::holds_alternative(q) && _stm_manifest.get_archive_start_offset() == model::offset{}) { vlog(_ctxlog.debug, "Using STM manifest for timequery {}", q); co_return std::ref(_stm_manifest);