diff --git a/sstables/sstables.cc b/sstables/sstables.cc index 902233e820..3cde38c1e7 100644 --- a/sstables/sstables.cc +++ b/sstables/sstables.cc @@ -1808,22 +1808,6 @@ sstable::component_type sstable::component_from_sstring(sstring &s) { return reverse_map(s, _component_map); } -// NOTE: Prefer using data_stream() if you know the byte position at which the -// read will stop. Knowing the end allows data_stream() to use a large a read- -// ahead buffer before reaching the end, but not over-read at the end, so -// data_stream() is more efficient than data_stream_at(). -input_stream sstable::data_stream_at(uint64_t pos, uint64_t buf_size, const io_priority_class& pc) { - file_input_stream_options options; - options.buffer_size = buf_size; - options.io_priority_class = pc; - if (_compression) { - return make_compressed_file_input_stream(_data_file, &_compression, - pos, _compression.data_len - pos, std::move(options)); - } else { - return make_file_input_stream(_data_file, pos, std::move(options)); - } -} - input_stream sstable::data_stream(uint64_t pos, size_t len, const io_priority_class& pc) { file_input_stream_options options; options.buffer_size = sstable_buffer_size; diff --git a/sstables/sstables.hh b/sstables/sstables.hh index 325f0bbbb8..7cef991c0e 100644 --- a/sstables/sstables.hh +++ b/sstables/sstables.hh @@ -422,8 +422,6 @@ private: future read_indexes(uint64_t summary_idx, const io_priority_class& pc); - input_stream data_stream_at(uint64_t pos, uint64_t buf_size, const io_priority_class& pc); - // Return an input_stream which reads exactly the specified byte range // from the data file (after uncompression, if the file is compressed). // Unlike data_read() below, this method does not read the entire byte