From 8bbc976ff1d0602ba30a80a0f4e70aa47cc1182d Mon Sep 17 00:00:00 2001 From: Calle Wilund Date: Wed, 3 Mar 2021 15:46:38 +0000 Subject: [PATCH] alternator::streams: Use better method for generation timestamp Get timestamp via system_distributed, instead of local gen. --- alternator/streams.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/alternator/streams.cc b/alternator/streams.cc index f6c6c75a24..4ca6cb9d98 100644 --- a/alternator/streams.cc +++ b/alternator/streams.cc @@ -1020,7 +1020,9 @@ future executor::get_records(client_state& client } // ugh. figure out if we are and end-of-shard - return cdc::get_local_streams_timestamp().then([this, iter, high_ts, start_time, ret = std::move(ret)](db_clock::time_point ts) mutable { + auto normal_token_owners = _proxy.get_token_metadata_ptr()->count_normal_token_owners(); + + return _sdks.cdc_current_generation_timestamp({ normal_token_owners }).then([this, iter, high_ts, start_time, ret = std::move(ret)](db_clock::time_point ts) mutable { auto& shard = iter.shard; if (shard.time < ts && ts < high_ts) {