Skip to content

Commit

Permalink
chore: print some log
Browse files Browse the repository at this point in the history
  • Loading branch information
fengys1996 committed Nov 15, 2023
1 parent 4a60863 commit 3676477
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/meta-srv/src/selector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ pub trait Selector: Send + Sync {
) -> Result<Self::Output>;
}

#[derive(Debug)]
pub struct SelectorOptions {
/// Minimum number of selected results.
pub min_required_items: usize,
Expand Down
6 changes: 6 additions & 0 deletions src/meta-srv/src/selector/load_based.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ use std::collections::HashMap;
use api::v1::meta::Peer;
use common_meta::key::TableMetadataManager;
use common_meta::rpc::router::find_leaders;
use common_telemetry::debug;
use parking_lot::RwLock;
use snafu::ResultExt;
use table::metadata::TableId;
Expand Down Expand Up @@ -98,6 +99,11 @@ where
let mut weighted_choose = self.weighted_choose.write();
let selected = choose_peers(weight_array, &opts, &mut *weighted_choose)?;

debug!(
"LoadBasedSelector select peers: {:?}, namespace: {}, opts: {:?}.",
selected, ns, opts,
);

Ok(selected)
}
}
Expand Down

0 comments on commit 3676477

Please sign in to comment.