From dd0fb48564dfd5448e090ff4807976677f76e045 Mon Sep 17 00:00:00 2001 From: Tomasz Grabiec Date: Thu, 12 Jan 2017 19:31:26 +0100 Subject: [PATCH] sstables: Close _file even if random_access_reader::close() reports errors close() operation is like a destructor, it cannot fail. It just reports errors, but close itself succeeds. So we should proceed with the closing even if it fails. Message-Id: <1484245886-7269-1-git-send-email-tgrabiec@scylladb.com> --- sstables/sstables.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sstables/sstables.cc b/sstables/sstables.cc index 620cb5cac6..10149793c7 100644 --- a/sstables/sstables.cc +++ b/sstables/sstables.cc @@ -132,7 +132,7 @@ public: seek(0); } virtual future<> close() override { - return random_access_reader::close().then([this] { + return random_access_reader::close().finally([this] { return _file.close().handle_exception([save = _file] (auto ep) { sstlog.warn("sstable close failed: {}", ep); general_disk_error();