From 136feffbad8d6d932231dfe9a9868537290e5a9b Mon Sep 17 00:00:00 2001 From: Zhenchi Date: Mon, 11 Sep 2023 06:32:34 +0000 Subject: [PATCH] refactor: rename table_creator Signed-off-by: Zhenchi --- src/common/meta/src/ddl_manager.rs | 8 ++++---- src/meta-srv/src/lib.rs | 2 +- src/meta-srv/src/metasrv/builder.rs | 6 +++--- .../src/{table_creator.rs => table_meta_alloc.rs} | 0 4 files changed, 8 insertions(+), 8 deletions(-) rename src/meta-srv/src/{table_creator.rs => table_meta_alloc.rs} (100%) diff --git a/src/common/meta/src/ddl_manager.rs b/src/common/meta/src/ddl_manager.rs index 1814b38645d5..b4787611d71e 100644 --- a/src/common/meta/src/ddl_manager.rs +++ b/src/common/meta/src/ddl_manager.rs @@ -49,7 +49,7 @@ pub struct DdlManager { datanode_manager: DatanodeManagerRef, cache_invalidator: CacheInvalidatorRef, table_metadata_manager: TableMetadataManagerRef, - table_creator: TableMetadataAllocatorRef, + table_meta_allocator: TableMetadataAllocatorRef, } impl DdlManager { @@ -58,14 +58,14 @@ impl DdlManager { datanode_clients: DatanodeManagerRef, cache_invalidator: CacheInvalidatorRef, table_metadata_manager: TableMetadataManagerRef, - table_creator: TableMetadataAllocatorRef, + table_meta_allocator: TableMetadataAllocatorRef, ) -> Self { Self { procedure_manager, datanode_manager: datanode_clients, cache_invalidator, table_metadata_manager, - table_creator, + table_meta_allocator, } } @@ -333,7 +333,7 @@ async fn handle_create_table_task( mut create_table_task: CreateTableTask, ) -> Result { let (table_id, region_routes) = ddl_manager - .table_creator + .table_meta_allocator .create( &TableMetadataAllocatorContext { cluster_id }, &mut create_table_task.table_info, diff --git a/src/meta-srv/src/lib.rs b/src/meta-srv/src/lib.rs index a340fb205bf2..4e5b26e1f532 100644 --- a/src/meta-srv/src/lib.rs +++ b/src/meta-srv/src/lib.rs @@ -34,7 +34,7 @@ pub mod procedure; pub mod pubsub; pub mod selector; pub mod service; -pub mod table_creator; +pub mod table_meta_alloc; pub mod table_routes; pub use crate::error::Result; diff --git a/src/meta-srv/src/metasrv/builder.rs b/src/meta-srv/src/metasrv/builder.rs index ae308a8c7607..1c630a30ab59 100644 --- a/src/meta-srv/src/metasrv/builder.rs +++ b/src/meta-srv/src/metasrv/builder.rs @@ -54,7 +54,7 @@ use crate::service::mailbox::MailboxRef; use crate::service::store::cached_kv::{CheckLeader, LeaderCachedKvStore}; use crate::service::store::kv::{KvBackendAdapter, KvStoreRef, ResettableKvStoreRef}; use crate::service::store::memory::MemStore; -use crate::table_creator::MetaSrvTableMetadataAllocator; +use crate::table_meta_alloc::MetaSrvTableMetadataAllocator; // TODO(fys): try use derive_builder macro pub struct MetaSrvBuilder { @@ -366,7 +366,7 @@ fn build_ddl_manager( }, )); - let table_creator = Arc::new(MetaSrvTableMetadataAllocator::new( + let table_meta_allocator = Arc::new(MetaSrvTableMetadataAllocator::new( selector_ctx.clone(), selector.clone(), table_id_sequence.clone(), @@ -377,7 +377,7 @@ fn build_ddl_manager( datanode_clients, cache_invalidator, table_metadata_manager.clone(), - table_creator, + table_meta_allocator, )) } diff --git a/src/meta-srv/src/table_creator.rs b/src/meta-srv/src/table_meta_alloc.rs similarity index 100% rename from src/meta-srv/src/table_creator.rs rename to src/meta-srv/src/table_meta_alloc.rs