mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-29 19:21:01 +00:00
Make sure mutation_reader for sstables can be fast-forwarded
Fixes #2145. Signed-off-by: Piotr Jastrzebski <piotr@scylladb.com> [tgrabiec: Extracted from a series, fixed title] Message-Id: <1495639745-19387-1-git-send-email-tgrabiec@scylladb.com>
This commit is contained in:
committed by
Paweł Dziepak
parent
6cf2841654
commit
6528f3a963
@@ -1105,7 +1105,15 @@ public:
|
||||
}
|
||||
|
||||
future<> fast_forward_to(const dht::partition_range& pr) {
|
||||
return _ds->fast_forward_to(pr);
|
||||
if (_ds) {
|
||||
return _ds->fast_forward_to(pr);
|
||||
}
|
||||
return (_get_data_source)().then([this, &pr] (lw_shared_ptr<sstable_data_source> ds) {
|
||||
// We must get the sstable_data_source and backup it in case we enable read
|
||||
// again in the future.
|
||||
_ds = std::move(ds);
|
||||
return _ds->fast_forward_to(pr);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user