Skip to content

Commit

Permalink
refactor: reduce meta server cache scope
Browse files Browse the repository at this point in the history
  • Loading branch information
WenyXu committed Nov 13, 2023
1 parent d6a35b3 commit 4964560
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/meta-srv/src/metasrv/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,6 @@ impl MetaSrvBuilder {
state.clone(),
kv_backend.clone(),
));
let kv_backend = leader_cached_kv_backend.clone() as _;

let meta_peer_client = meta_peer_client
.unwrap_or_else(|| build_default_meta_peer_client(&election, &in_memory));
Expand All @@ -177,7 +176,9 @@ impl MetaSrvBuilder {
let mailbox = build_mailbox(&kv_backend, &pushers);
let procedure_manager = build_procedure_manager(&options, &kv_backend);
let table_id_sequence = Arc::new(Sequence::new(TABLE_ID_SEQ, 1024, 10, kv_backend.clone()));
let table_metadata_manager = Arc::new(TableMetadataManager::new(kv_backend.clone()));
let table_metadata_manager = Arc::new(TableMetadataManager::new(
leader_cached_kv_backend.clone() as _,
));
let lock = lock.unwrap_or_else(|| Arc::new(MemLock::default()));
let selector_ctx = SelectorContext {
server_addr: options.server_addr.clone(),
Expand Down

0 comments on commit 4964560

Please sign in to comment.