From 31f4cd21ebb773c1703eaf0177dcafc2eeef8e86 Mon Sep 17 00:00:00 2001 From: Benny Halevy Date: Mon, 7 Feb 2022 10:00:41 +0200 Subject: [PATCH] shard_reader: close: degrade error message to warning 1. There's nothing we can do about this error. 2. It doesn't affect any query 3. No need to reprort timeout errors here. Refs #10029 Note that in 4.6.rc4-0.20220203.34d470967a0 (where the issue above was opened against) the error is likely to be related to read_ahead failure which is already reported as a warning in master since fc729a804b. When backported, this patch should be applied after: fc729a804b5ae9fa8bd8de33ef63aeae4dd3ccf9 d7a993043de250f39c3881017b83fbb1e789e6fb Signed-off-by: Benny Halevy Message-Id: <20220207080041.174934-1-bhalevy@scylladb.com> --- mutation_reader.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/mutation_reader.cc b/mutation_reader.cc index 4d3c2d249e..1e8771a6f0 100644 --- a/mutation_reader.cc +++ b/mutation_reader.cc @@ -2082,7 +2082,10 @@ future<> shard_reader::close() noexcept { try { co_await *std::exchange(_read_ahead, std::nullopt); } catch (...) { - mrlog.warn("shard_reader::close(): read_ahead on shard {} failed: {}", _shard, std::current_exception()); + auto ex = std::current_exception(); + if (!is_timeout_exception(ex)) { + mrlog.warn("shard_reader::close(): read_ahead on shard {} failed: {}", _shard, ex); + } } } @@ -2110,7 +2113,7 @@ future<> shard_reader::close() noexcept { }); }); } catch (...) { - mrlog.error("shard_reader::close(): failed to stop reader on shard {}: {}", _shard, std::current_exception()); + mrlog.warn("shard_reader::close(): failed to stop reader on shard {}: {}", _shard, std::current_exception()); } }