From 88d4a66e90f72073bcde24e6a4070636da280b0a Mon Sep 17 00:00:00 2001 From: Piotr Sarna Date: Mon, 14 Jun 2021 09:28:49 +0200 Subject: [PATCH] db,view: pass base token by value to mutate_MV The base token is passed cross-continuations, so the current way of passing it by const reference probably only works because the token copying is cheap enough to optimize the reference out. Fix by explicitly taking the token by value. --- db/view/view.cc | 2 +- db/view/view.hh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/db/view/view.cc b/db/view/view.cc index b34ce9d5e9..d76188e384 100644 --- a/db/view/view.cc +++ b/db/view/view.cc @@ -1194,7 +1194,7 @@ static future<> apply_to_remote_endpoints(gms::inet_address target, inet_address // appropriate paired replicas. This is done asynchronously - we do not wait // for the writes to complete. future<> mutate_MV( - const dht::token& base_token, + dht::token base_token, std::vector view_updates, db::view::stats& stats, cf_stats& cf_stats, diff --git a/db/view/view.hh b/db/view/view.hh index 88aba876df..c8f3277cd4 100644 --- a/db/view/view.hh +++ b/db/view/view.hh @@ -151,7 +151,7 @@ query::clustering_row_ranges calculate_affected_clustering_ranges( struct wait_for_all_updates_tag {}; using wait_for_all_updates = bool_class; future<> mutate_MV( - const dht::token& base_token, + dht::token base_token, std::vector view_updates, db::view::stats& stats, cf_stats& cf_stats,