From 7647acd201b3ef199c033b3274cdb86690a6127a Mon Sep 17 00:00:00 2001 From: Glauber Costa Date: Thu, 17 Nov 2016 12:31:37 -0500 Subject: [PATCH] commitlog: close replay file Replay file is opened, so it should be closed. We're not seeing any problems arising from this, but they may happen. Enabling read ahead in this stream makes them happen immediately. Fix it. Signed-off-by: Glauber Costa (cherry picked from commit 4d3d774757d87708fe79c88f4c326eb35c294924) --- db/commitlog/commitlog.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/commitlog/commitlog.cc b/db/commitlog/commitlog.cc index fbcd979063..87f7052f72 100644 --- a/db/commitlog/commitlog.cc +++ b/db/commitlog/commitlog.cc @@ -1601,7 +1601,7 @@ db::commitlog::read_log_file(file f, commit_load_reader_func next, position_type } future<> stop() { eof = true; - return make_ready_future<>(); + return fin.close(); } future<> read_header() { return fin.read_exactly(segment::descriptor_header_size).then([this](temporary_buffer buf) {