db,view: add allow_hints parameter to mutate_MV

Mutating MV function can now accept a parameter whether
hints should be allowed during sending mutations to endpoints.
This commit is contained in:
Piotr Sarna
2019-01-25 10:11:07 +01:00
parent e0fe9ce2c0
commit e30cf22956
2 changed files with 13 additions and 4 deletions

View File

@@ -933,7 +933,8 @@ future<> mutate_MV(
const dht::token& base_token,
std::vector<frozen_mutation_and_schema> view_updates,
db::view::stats& stats,
db::timeout_semaphore_units pending_view_updates)
db::timeout_semaphore_units pending_view_updates,
service::allow_hints allow_hints)
{
auto fs = std::make_unique<std::vector<future<>>>();
fs->reserve(view_updates.size());
@@ -1000,7 +1001,8 @@ future<> mutate_MV(
*paired_endpoint,
std::move(pending_endpoints),
db::write_type::VIEW,
stats).then_wrapped(
stats,
allow_hints).then_wrapped(
[paired_endpoint,
is_endpoint_local,
updates_pushed_remote,
@@ -1026,7 +1028,8 @@ future<> mutate_MV(
std::move(mut),
target,
std::move(pending_endpoints),
db::write_type::VIEW).then_wrapped(
db::write_type::VIEW,
allow_hints).then_wrapped(
[target,
updates_pushed_remote,
maybe_account_failure = std::move(maybe_account_failure)] (future<>&& f) {

View File

@@ -33,6 +33,11 @@
class frozen_mutation_and_schema;
namespace service {
struct allow_hints_tag;
using allow_hints = bool_class<allow_hints_tag>;
}
namespace db {
namespace view {
@@ -109,7 +114,8 @@ future<> mutate_MV(
const dht::token& base_token,
std::vector<frozen_mutation_and_schema> view_updates,
db::view::stats& stats,
db::timeout_semaphore_units pending_view_updates);
db::timeout_semaphore_units pending_view_updates,
service::allow_hints allow_hints = service::allow_hints::yes);
/**
* create_virtual_column() adds a "virtual column" to a schema builder.