Revert "commitlog: close file after read, and not at stop"

This reverts commit be9e419a32.
This commit is contained in:
Pekka Enberg
2016-12-13 09:47:32 +02:00
parent 53c3219e56
commit 55dc520405

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) {
@@ -1755,8 +1755,6 @@ db::commitlog::read_log_file(file f, commit_load_reader_func next, position_type
throw segment_data_corruption_error("Data corruption", corrupt_size);
}
});
}).finally([this] {
return fin.close();
});
}
};