fix: only register region keeper while creating physical table (#3223)

fix: only register region keeper during create physical table
This commit is contained in:
Weny Xu
2024-01-23 18:42:32 +09:00
committed by GitHub
parent 26535f577d
commit d75cf86467
2 changed files with 12 additions and 7 deletions

View File

@@ -232,12 +232,14 @@ impl CreateTableProcedure {
region_routes: &[RegionRoute],
request_builder: CreateRequestBuilder,
) -> Result<Status> {
// Registers opening regions
let guards = self
.creator
.register_opening_regions(&self.context, region_routes)?;
if !guards.is_empty() {
self.creator.opening_regions = guards;
if self.creator.data.table_route.is_physical() {
// Registers opening regions
let guards = self
.creator
.register_opening_regions(&self.context, region_routes)?;
if !guards.is_empty() {
self.creator.opening_regions = guards;
}
}
let create_table_data = &self.creator.data;