mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-31 20:16:43 +00:00
sstables: close input stream in sstable::data_read()
Signed-off-by: Paweł Dziepak <pdziepak@scylladb.com>
This commit is contained in:
@@ -1839,7 +1839,9 @@ input_stream<char> sstable::data_stream(uint64_t pos, size_t len, const io_prior
|
||||
|
||||
future<temporary_buffer<char>> sstable::data_read(uint64_t pos, size_t len, const io_priority_class& pc) {
|
||||
return do_with(data_stream(pos, len, pc), [len] (auto& stream) {
|
||||
return stream.read_exactly(len);
|
||||
return stream.read_exactly(len).finally([&stream] {
|
||||
return stream.close();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user