row_cache: Switch _prev_snapshot_pos to be a ring_position_ext

dht::ring_position cannot represent all ring_position_view instances,
in particular those obtained from
dht::ring_position_view::for_range_start(). To allow using the latter,
switch to views.
This commit is contained in:
Tomasz Grabiec
2019-05-10 16:58:12 +02:00
parent 1530224377
commit 595e1a540e
2 changed files with 2 additions and 2 deletions

View File

@@ -982,7 +982,7 @@ future<> row_cache::do_update(external_updater eu, memtable& m, Updater updater)
_prev_snapshot_pos = {};
} else {
_update_section(_tracker.region(), [&] {
_prev_snapshot_pos = dht::ring_position(m.partitions.begin()->key());
_prev_snapshot_pos = m.partitions.begin()->key();
});
}
});

View File

@@ -377,7 +377,7 @@ private:
mutation_source_opt _prev_snapshot;
// Positions >= than this are using _prev_snapshot, the rest is using _underlying.
std::optional<dht::ring_position> _prev_snapshot_pos;
std::optional<dht::ring_position_ext> _prev_snapshot_pos;
snapshot_source _snapshot_source;