File tree Expand file tree Collapse file tree 2 files changed +17
-3
lines changed
src/v/cloud_topics/level_one/compaction Expand file tree Collapse file tree 2 files changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -283,12 +283,22 @@ void log_info_collector::populate_log_infos(
283283 auto & compaction_info = it->second ;
284284
285285 if (!compaction_info.has_value ()) {
286- vlog (
287- compaction_log.warn ,
286+ // Minimize logging on benign `missing_ntp` errors in case
287+ // the `metastore` does not yet have any reconciled data for the log
288+ // in question.
289+ auto err = compaction_info.error ();
290+ auto lvl = err == metastore::errc::missing_ntp
291+ && !log.has_seen_reconciled_data
292+ ? ss::log_level::debug
293+ : ss::log_level::warn;
294+
295+ vlogl (
296+ compaction_log,
297+ lvl,
288298 " Failed to collect compaction info for CTP {} during compaction: "
289299 " {}" ,
290300 log.ntp ,
291- compaction_info. error () );
301+ err );
292302 continue ;
293303 }
294304
@@ -301,6 +311,7 @@ void log_info_collector::populate_log_infos(
301311
302312 auto max_compactible_offset = offset_it->second ;
303313
314+ log.has_seen_reconciled_data = true ;
304315 log.info_and_ts = compaction_info_and_timestamp{
305316 .info = std::move (compaction_info).value (),
306317 .collected_at = collection_timestamp,
Original file line number Diff line number Diff line change @@ -54,6 +54,9 @@ struct log_compaction_meta {
5454 // inflight compaction. Guaranteed to have a value if `state == inflight`.
5555 std::optional<ss::shard_id> inflight_shard{std::nullopt };
5656 intrusive_list_hook link;
57+ // If `true`, we have been able to sample compaction info from the
58+ // `metastore` previously.
59+ bool has_seen_reconciled_data{false };
5760};
5861
5962using log_compaction_meta_ptr = ss::lw_shared_ptr<log_compaction_meta>;
You can’t perform that action at this time.
0 commit comments