Skip to content

Commit

Permalink
refactor(metasrv): adjust some info level logging to debug or warn
Browse files Browse the repository at this point in the history
- Fix: #6447
  • Loading branch information
drmingdrmer committed Jul 5, 2022
1 parent 7cbc1c5 commit 60ac848
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions metasrv/src/api/grpc/grpc_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ impl MetaService for MetaServiceImpl {

add_meta_metrics_meta_request_inflights(1);

tracing::info!("Receive write_action: {:?}", action);
tracing::debug!("Receive write_action: {:?}", action);

let body = self.action_handler.execute_write(action).await;

Expand All @@ -177,7 +177,7 @@ impl MetaService for MetaServiceImpl {

add_meta_metrics_meta_request_inflights(1);

tracing::info!("Receive read_action: {:?}", action);
tracing::debug!("Receive read_action: {:?}", action);

let res = self.action_handler.execute_read(action).await;

Expand Down Expand Up @@ -239,7 +239,7 @@ impl MetaService for MetaServiceImpl {

let request = request.into_inner();

tracing::info!("Receive txn_request: {:?}", request);
tracing::debug!("Receive txn_request: {:?}", request);

let body = self.action_handler.execute_txn(request).await;
add_meta_metrics_meta_request_inflights(-1);
Expand Down
2 changes: 1 addition & 1 deletion metasrv/src/meta_service/raftmeta.rs
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ impl MetaNode {
let _rst = mn.add_configured_non_voters().await;

if _rst.is_err() {
tracing::info!(
tracing::warn!(
"fail to add non-voter: my id={}, rst:{:?}",
mn.sto.id,
_rst
Expand Down
4 changes: 2 additions & 2 deletions metasrv/src/network.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ impl Network {
incr_meta_metrics_active_peers(target, &endpoint.clone().into(), 1);
let client = RaftServiceClient::new(channel);

tracing::info!("connected: target={}: {}", target, addr);
tracing::debug!("connected: target={}: {}", target, addr);

Ok((client, endpoint))
}
Expand Down Expand Up @@ -190,7 +190,7 @@ impl RaftNetwork<LogEntry> for Network {
self.incr_meta_metrics_sent_bytes_to_peer(&target, req.get_ref());

let resp = client.vote(req).await;
tracing::info!("vote: resp from target={} {:?}", target, resp);
tracing::debug!("vote: resp from target={} {:?}", target, resp);

if resp.is_err() {
incr_meta_metrics_sent_failure_to_peer(&target);
Expand Down
4 changes: 2 additions & 2 deletions metasrv/src/store/meta_raft_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ impl RaftStorage<LogEntry, AppliedState> for MetaRaftStore {
async fn get_current_snapshot(
&self,
) -> Result<Option<openraft::storage::Snapshot<Self::SnapshotData>>, StorageError> {
tracing::info!("got snapshot start");
tracing::info!("get snapshot start");
let snap = match &*self.current_snapshot.read().await {
Some(snapshot) => {
let data = snapshot.data.clone();
Expand All @@ -465,7 +465,7 @@ impl RaftStorage<LogEntry, AppliedState> for MetaRaftStore {
None => Ok(None),
};

tracing::info!("got snapshot complete");
tracing::info!("get snapshot complete");

snap
}
Expand Down
2 changes: 1 addition & 1 deletion metasrv/src/watcher/watcher_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ impl WatcherManagerCore {
incr_meta_metrics_meta_sent_bytes(resp.encoded_len() as u64);

if let Err(err) = stream.send(resp).await {
tracing::info!(
tracing::warn!(
"close watcher stream {:?} cause send err: {:?}",
watcher_id,
err
Expand Down

0 comments on commit 60ac848

Please sign in to comment.