From 682805b22cc2fdfe2798dea930ea360da19058ef Mon Sep 17 00:00:00 2001 From: Jesse Haber-Kucharsky Date: Wed, 5 Sep 2018 12:11:23 -0400 Subject: [PATCH] auth: Use finite time-out for all QUORUM reads Commit e664f9b0c662a0baee762e19f287e94c053001e3 transitioned internal CQL queries in the auth. sub-system to be executed with finite time-outs instead of infinite ones. It should have also modified the functions in `auth/roles-metadata.cc` to have finite time-outs. This change fixes some previously failing dtests, particularly around repair. Without this change, the QUORUM query fails to terminate when the necessary consistency level cannot be achieved. Fixes #3736. Signed-off-by: Jesse Haber-Kucharsky Message-Id: --- auth/roles-metadata.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/auth/roles-metadata.cc b/auth/roles-metadata.cc index 07063494ad..1b7a8ac110 100644 --- a/auth/roles-metadata.cc +++ b/auth/roles-metadata.cc @@ -79,7 +79,7 @@ future default_role_row_satisfies( return qp.process( query, db::consistency_level::QUORUM, - infinite_timeout_config, + internal_distributed_timeout_config(), {meta::DEFAULT_SUPERUSER_NAME}, true).then([&p](::shared_ptr results) { if (results->empty()) { @@ -104,7 +104,7 @@ future any_nondefault_role_row_satisfies( return qp.process( query, db::consistency_level::QUORUM, - infinite_timeout_config).then([&p](::shared_ptr results) { + internal_distributed_timeout_config()).then([&p](::shared_ptr results) { if (results->empty()) { return false; }