shard_reader: Continue after read_ahead error
If read ahead failed, just issue a log warning and proceed to close the reader. Currently co_await will throw and the evictable reader won't be closed. This is seen occasionally in testing, e.g. https://jenkins.scylladb.com/view/master/job/scylla-master/job/dtest-debug/1010/artifact/logs-all.debug.2/1640918573898_lwt_banking_load_test.py%3A%3ATestLWTBankingLoad%3A%3Atest_bank_with_nemesis/node2.log ``` ERROR 2021-12-31 02:40:56,160 [shard 0] mutation_reader - shard_reader::close(): failed to stop reader on shard 1: seastar::named_semaphore_timed_out (Semaphore timed out: _system_read_concurrency_sem) ``` Fixes #9865. Signed-off-by: Benny Halevy <bhalevy@scylladb.com> Message-Id: <20220102124636.2791544-1-bhalevy@scylladb.com>
This commit is contained in:
@@ -1645,11 +1645,15 @@ future<> shard_reader::close() noexcept {
|
||||
co_return;
|
||||
}
|
||||
|
||||
try {
|
||||
if (_read_ahead) {
|
||||
if (_read_ahead) {
|
||||
try {
|
||||
co_await *std::exchange(_read_ahead, std::nullopt);
|
||||
} catch (...) {
|
||||
mrlog.warn("shard_reader::close(): read_ahead on shard {} failed: {}", _shard, std::current_exception());
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
co_await smp::submit_to(_shard, [this] {
|
||||
auto irh = std::move(*_reader).inactive_read_handle();
|
||||
return with_closeable(flat_mutation_reader(_reader.release()), [this] (flat_mutation_reader& reader) mutable {
|
||||
|
||||
Reference in New Issue
Block a user