chore: debt 3696 (#3705)

This commit is contained in:
Jeremyhi
2024-04-15 17:02:19 +08:00
committed by GitHub
parent 87795248dd
commit e6507aaf34
2 changed files with 1 additions and 7 deletions

View File

@@ -468,28 +468,24 @@ impl MetaClient {
Ok(res)
}
#[inline]
pub fn heartbeat_client(&self) -> Result<HeartbeatClient> {
self.heartbeat.clone().context(NotStartedSnafu {
name: "heartbeat_client",
})
}
#[inline]
pub fn store_client(&self) -> Result<StoreClient> {
self.store.clone().context(NotStartedSnafu {
name: "store_client",
})
}
#[inline]
pub fn lock_client(&self) -> Result<LockClient> {
self.lock.clone().context(NotStartedSnafu {
name: "lock_client",
})
}
#[inline]
pub fn procedure_client(&self) -> Result<ProcedureClient> {
self.procedure.clone().context(NotStartedSnafu {
name: "procedure_client",
@@ -502,12 +498,10 @@ impl MetaClient {
})
}
#[inline]
pub fn channel_config(&self) -> &ChannelConfig {
self.channel_manager.config()
}
#[inline]
pub fn id(&self) -> Id {
self.id
}

View File

@@ -166,7 +166,7 @@ impl Election for EtcdElection {
if let Some(res) = receiver.message().await.context(error::EtcdFailedSnafu)? {
if res.ttl() <= 0 {
// Failed to keep alive, just break the loop.
warn!("Candidate lease expired, key: {}", self.candidate_key());
break;
}
}