Skip to content

Commit

Permalink
refactor: rename table_creator
Browse files Browse the repository at this point in the history
Signed-off-by: Zhenchi <[email protected]>
  • Loading branch information
zhongzc authored and WenyXu committed Sep 12, 2023
1 parent 094d463 commit 136feff
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/common/meta/src/ddl_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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,
}
}

Expand Down Expand Up @@ -333,7 +333,7 @@ async fn handle_create_table_task(
mut create_table_task: CreateTableTask,
) -> Result<SubmitDdlTaskResponse> {
let (table_id, region_routes) = ddl_manager
.table_creator
.table_meta_allocator
.create(
&TableMetadataAllocatorContext { cluster_id },
&mut create_table_task.table_info,
Expand Down
2 changes: 1 addition & 1 deletion src/meta-srv/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions src/meta-srv/src/metasrv/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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(),
Expand All @@ -377,7 +377,7 @@ fn build_ddl_manager(
datanode_clients,
cache_invalidator,
table_metadata_manager.clone(),
table_creator,
table_meta_allocator,
))
}

Expand Down
File renamed without changes.

0 comments on commit 136feff

Please sign in to comment.