replica/table: adjust the view read-before-write to return static rows when needed
Adjusts the read-before-write query issued in `table::do_push_view_replica_updates` so that, when needed, requests static columns and makes sure that the static row is present.
This commit is contained in:
@@ -1510,6 +1510,12 @@ future<query::clustering_row_ranges> calculate_affected_clustering_ranges(const
|
||||
|
||||
}
|
||||
|
||||
bool needs_static_row(const mutation_partition& mp, const std::vector<view_and_base>& views) {
|
||||
// TODO: We could also check whether any of the views need static rows
|
||||
// and return false if none of them do
|
||||
return mp.partition_tombstone() || !mp.static_row().empty();
|
||||
}
|
||||
|
||||
// Calculate the node ("natural endpoint") to which this node should send
|
||||
// a view update.
|
||||
//
|
||||
|
||||
@@ -305,6 +305,8 @@ future<query::clustering_row_ranges> calculate_affected_clustering_ranges(
|
||||
const mutation_partition& mp,
|
||||
const std::vector<view_and_base>& views);
|
||||
|
||||
bool needs_static_row(const mutation_partition& mp, const std::vector<view_and_base>& views);
|
||||
|
||||
struct wait_for_all_updates_tag {};
|
||||
using wait_for_all_updates = bool_class<wait_for_all_updates_tag>;
|
||||
future<> mutate_MV(
|
||||
|
||||
Reference in New Issue
Block a user