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