From 8429b53801366108b7e31bc6a76f0a0fcde92eb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20Uzarski?= Date: Mon, 23 Dec 2024 07:32:25 +0100 Subject: [PATCH] session: rename query_plan -> request_plan --- scylla/src/transport/session.rs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/scylla/src/transport/session.rs b/scylla/src/transport/session.rs index 003e8c7b5..705d4e5f2 100644 --- a/scylla/src/transport/session.rs +++ b/scylla/src/transport/session.rs @@ -1948,11 +1948,11 @@ where let runner = async { let cluster_data = self.cluster.get_data(); - let query_plan = + let request_plan = load_balancing::Plan::new(load_balancer.as_ref(), &statement_info, &cluster_data); - // If a speculative execution policy is used to run query, query_plan has to be shared - // between different async functions. This struct helps to wrap query_plan in mutex so it + // If a speculative execution policy is used to run query, request_plan has to be shared + // between different async functions. This struct helps to wrap request_plan in mutex so it // can be shared safely. struct SharedPlan<'a, I> where @@ -1981,8 +1981,8 @@ where match speculative_policy { Some(speculative) if statement_config.is_idempotent => { - let shared_query_plan = SharedPlan { - iter: std::sync::Mutex::new(query_plan), + let shared_request_plan = SharedPlan { + iter: std::sync::Mutex::new(request_plan), }; let request_runner_generator = |is_speculative: bool| { @@ -2007,7 +2007,7 @@ where } self.execute_request_with_retries( - &shared_query_plan, + &shared_request_plan, &execute_request_once, &execution_profile, ExecuteRequestContext { @@ -2042,7 +2042,7 @@ where speculative_id: None, }); self.execute_request_with_retries( - query_plan, + request_plan, &execute_request_once, &execution_profile, ExecuteRequestContext { @@ -2093,7 +2093,7 @@ where /// Returns None, if provided plan is empty. async fn execute_request_with_retries<'a, QueryFut, ResT>( &'a self, - query_plan: impl Iterator, Shard)>, + request_plan: impl Iterator, Shard)>, execute_request_once: impl Fn(Arc, Consistency, &ExecutionProfileInner) -> QueryFut, execution_profile: &ExecutionProfileInner, mut context: ExecuteRequestContext<'a>, @@ -2107,7 +2107,7 @@ where .consistency_set_on_statement .unwrap_or(execution_profile.consistency); - 'nodes_in_plan: for (node, shard) in query_plan { + 'nodes_in_plan: for (node, shard) in request_plan { let span = trace_span!("Executing query", node = %node.address); 'same_node_retries: loop { trace!(parent: &span, "Execution started");