From 595e1a540e6bdefe99b69128f804f66da6ba9a3f Mon Sep 17 00:00:00 2001 From: Tomasz Grabiec Date: Fri, 10 May 2019 16:58:12 +0200 Subject: [PATCH] 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. --- row_cache.cc | 2 +- row_cache.hh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/row_cache.cc b/row_cache.cc index f3dab04ddb..9454a25e11 100644 --- a/row_cache.cc +++ b/row_cache.cc @@ -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(); }); } }); diff --git a/row_cache.hh b/row_cache.hh index 16ed0a8f51..09599cb1d3 100644 --- a/row_cache.hh +++ b/row_cache.hh @@ -377,7 +377,7 @@ private: mutation_source_opt _prev_snapshot; // Positions >= than this are using _prev_snapshot, the rest is using _underlying. - std::optional _prev_snapshot_pos; + std::optional _prev_snapshot_pos; snapshot_source _snapshot_source;