Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
Signed-off-by: Peng Chen <[email protected]>
  • Loading branch information
shanicky committed Jan 29, 2023
1 parent 550bb73 commit de27b3f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/rpc_client/src/meta_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -929,7 +929,7 @@ impl GrpcMetaClient {
addr: &str,
force_refresh_receiver: Receiver<Sender<Result<()>>>,
) -> Result<()> {
tracing::info!("using {} as initial leader", addr);
tracing::info!("using {} as initial leader and members", addr);
let core_ref = self.core.clone();
let current_leader = addr.to_string();
let mut members = HashMap::new();
Expand Down Expand Up @@ -972,7 +972,7 @@ impl GrpcMetaClient {
let members_resp = match client.to_owned().members(MembersRequest {}).await {
Ok(resp) => resp.into_inner(),
Err(e) => {
tracing::debug!("failed to fetch members from {}, {}", addr, e);
tracing::warn!("failed to fetch members from {}, {}", addr, e);
continue;
}
};
Expand Down Expand Up @@ -1012,7 +1012,7 @@ impl GrpcMetaClient {
let leader_resp = match client.to_owned().leader(LeaderRequest {}).await {
Ok(resp) => resp.into_inner(),
Err(e) => {
tracing::debug!("failed to fetch leader from {}, {}", addr, e);
tracing::warn!("failed to fetch leader from {}, {}", addr, e);
continue;
}
};
Expand Down Expand Up @@ -1225,6 +1225,7 @@ impl GrpcMetaClient {
code,
Code::Unknown | Code::Unimplemented | Code::Unavailable
) {
tracing::info!("matching tonic code {}", code);
let (result_sender, result_receiver) = oneshot::channel();
if self.force_refresh_sender.try_send(result_sender).is_ok() {
if let Ok(Err(e)) = result_receiver.await {
Expand Down

0 comments on commit de27b3f

Please sign in to comment.