From ed45aedff9de0cf2c6eacd3bfb67159dd64a8ccb Mon Sep 17 00:00:00 2001 From: Geoffrey Date: Tue, 9 Nov 2021 14:48:35 +0100 Subject: [PATCH] deprecate internal_distributed_timeout_config It has been replaced by internal_distributed_query_state --- auth/rest_authenticator.cc | 18 +++++++++--------- auth/rest_role_manager.cc | 8 ++++---- test/boost/rest_authenticator_test.cc | 8 ++++---- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/auth/rest_authenticator.cc b/auth/rest_authenticator.cc index da3ca6472eb4..79a5b4a678f1 100644 --- a/auth/rest_authenticator.cc +++ b/auth/rest_authenticator.cc @@ -123,7 +123,7 @@ namespace auth { return _qp.execute_internal( update_row_query(), db::consistency_level::QUORUM, - internal_distributed_timeout_config(), + internal_distributed_query_state(), {passwords::hash(DEFAULT_USER_PASSWORD, rng_for_salt), DEFAULT_USER_NAME}).then([](auto &&) { plogger.info("Created default superuser authentication record."); }); @@ -237,13 +237,13 @@ namespace auth { _qp.execute_internal( query_roles, consistency_for_user(username), - internal_distributed_timeout_config(), + internal_distributed_query_state(), {username}, true), _qp.execute_internal( query_roles_valid, consistency_for_user(username), - internal_distributed_timeout_config(), + internal_distributed_query_state(), {username}, true) ); @@ -343,12 +343,12 @@ namespace auth { _qp.execute_internal( create_row_query_roles(), consistency_for_user(role_name), - internal_distributed_timeout_config(), + internal_distributed_query_state(), {role_name, passwords::hash(*options.password, rng_for_salt)}), _qp.execute_internal( create_row_query_roles_valid(_authenticator_config.rest_authenticator_endpoint_ttl), consistency_for_user(role_name), - internal_distributed_timeout_config(), + internal_distributed_query_state(), {role_name}) ).then([this, role_name, &roles](auto f) { return modify_membership(role_name, roles); @@ -377,12 +377,12 @@ namespace auth { _qp.execute_internal( query, consistency_for_user(role_name), - internal_distributed_timeout_config(), + internal_distributed_query_state(), {passwords::hash(*options.password, rng_for_salt), role_name}), _qp.execute_internal( create_row_query_roles_valid(_authenticator_config.rest_authenticator_endpoint_ttl), consistency_for_user(role_name), - internal_distributed_timeout_config(), + internal_distributed_query_state(), {role_name}) ).then([this, role_name, &roles](auto f) { return modify_membership(role_name, roles); @@ -397,7 +397,7 @@ namespace auth { return _qp.execute_internal( query, consistency_for_user(name), - internal_distributed_timeout_config(), + internal_distributed_query_state(), {sstring(name)}).discard_result(); } @@ -413,7 +413,7 @@ namespace auth { return _qp.execute_internal( query, consistency_for_user(grantee_name), - internal_distributed_timeout_config(), + internal_distributed_query_state(), {roles, grantee_name}); }; diff --git a/auth/rest_role_manager.cc b/auth/rest_role_manager.cc index f8237fe1d759..c64889fc3e05 100644 --- a/auth/rest_role_manager.cc +++ b/auth/rest_role_manager.cc @@ -98,7 +98,7 @@ namespace auth { return _qp.execute_internal( query, db::consistency_level::QUORUM, - internal_distributed_timeout_config(), + internal_distributed_query_state(), {meta::DEFAULT_SUPERUSER_NAME}).then([](auto&&) { log.info("Created default superuser role '{}'.", meta::DEFAULT_SUPERUSER_NAME); return make_ready_future<>(); @@ -140,7 +140,7 @@ namespace auth { return qp.execute_internal( query, consistency_for_role(role_name), - internal_distributed_timeout_config(), + internal_distributed_query_state(), {sstring(role_name)}, true).then([](::shared_ptr results) { if (results->empty()) { @@ -226,7 +226,7 @@ namespace auth { return _qp.execute_internal( query, consistency_for_role(role_name), - internal_distributed_timeout_config(), + internal_distributed_query_state(), {sstring(role_name), c.is_superuser, c.can_login}, true).discard_result(); } @@ -267,7 +267,7 @@ namespace auth { return _qp.execute_internal( query, db::consistency_level::QUORUM, - internal_distributed_timeout_config()).then([](::shared_ptr results) { + internal_distributed_query_state()).then([](::shared_ptr results) { role_set roles; std::for_each( diff --git a/test/boost/rest_authenticator_test.cc b/test/boost/rest_authenticator_test.cc index 9dc1f57b6c9e..dfeab952cc9a 100644 --- a/test/boost/rest_authenticator_test.cc +++ b/test/boost/rest_authenticator_test.cc @@ -128,7 +128,7 @@ static future > find_record(cql3::query_processor &qp, std return qp.execute_internal( query, db::consistency_level::LOCAL_ONE, - auth::internal_distributed_timeout_config(), + auth::internal_distributed_query_state(), {sstring(role_name)}, true).then([](::shared_ptr results) { if (results->empty()) { @@ -196,7 +196,7 @@ static future<> delete_record_valid(cql3::query_processor &qp, std::string_view return qp.execute_internal( query, db::consistency_level::LOCAL_ONE, - auth::internal_distributed_timeout_config(), + auth::internal_distributed_query_state(), {sstring(role_name)}, true).discard_result(); }; @@ -208,7 +208,7 @@ static future > find_record_valid(cql3::query_processor & return qp.execute_internal( query, db::consistency_level::LOCAL_ONE, - auth::internal_distributed_timeout_config(), + auth::internal_distributed_query_state(), {sstring(role_name)}, true).then([](::shared_ptr results) { if (results->empty()) { @@ -239,7 +239,7 @@ static future<> create_superuser_role(cql3::query_processor &qp) { return qp.execute_internal( query, db::consistency_level::QUORUM, - auth::internal_distributed_timeout_config(), + auth::internal_distributed_query_state(), {auth::meta::DEFAULT_SUPERUSER_NAME, auth::passwords::hash(sstring(auth::meta::DEFAULT_SUPERUSER_NAME), rng_for_salt)}).discard_result(); }