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 <glauber@scylladb.com>
(cherry picked from commit 4d3d774757)
This commit is contained in:
Glauber Costa
2016-11-17 12:31:37 -05:00
committed by Tomasz Grabiec
parent f35c088363
commit 7647acd201

View File

@@ -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<char> buf) {