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:
fc729a804b
d7a993043d

Signed-off-by: Benny Halevy <bhalevy@scylladb.com>
Message-Id: <20220207080041.174934-1-bhalevy@scylladb.com>
This commit is contained in:
Benny Halevy
2022-02-07 10:00:41 +02:00
committed by Avi Kivity
parent 93eed6d0c7
commit 31f4cd21eb

View File

@@ -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());
}
}