From 817b6504d5f2a95e62e0fd468dfaf73f2f2b620b Mon Sep 17 00:00:00 2001 From: WenyXu Date: Thu, 4 Jan 2024 09:59:57 +0000 Subject: [PATCH] chore: apply suggestions from CR --- src/metric-engine/src/engine/alter.rs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/metric-engine/src/engine/alter.rs b/src/metric-engine/src/engine/alter.rs index aa8e37d8a65c..78dd66d166c6 100644 --- a/src/metric-engine/src/engine/alter.rs +++ b/src/metric-engine/src/engine/alter.rs @@ -29,14 +29,9 @@ impl MetricEngineInner { region_id: RegionId, request: RegionAlterRequest, ) -> Result { - let is_altering_logical_region = self - .state - .read() - .await - .physical_regions() - .contains_key(®ion_id); + let is_altering_physical_region = self.is_physical_region(region_id).await; - let result = if is_altering_logical_region { + let result = if is_altering_physical_region { self.alter_physical_region(region_id, request).await } else { self.alter_logical_region(region_id, request).await