Skip to content

Commit

Permalink
chore(bors): merge pull request #732
Browse files Browse the repository at this point in the history
732: fix(pstor): when lease is lost exit instead of panic r=tiagolobocastro a=tiagolobocastro

Avoids generating coredumps, as it won't add anything useful here.

Co-authored-by: Tiago Castro <[email protected]>
  • Loading branch information
mayastor-bors and tiagolobocastro committed Feb 1, 2024
2 parents 81f812f + 9d59b06 commit f6479db
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion utils/pstor/src/etcd_keep_alive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -550,10 +550,11 @@ impl LeaseLockKeeperClocking<KeepAlive> for EtcdSingletonLock {
impl LeaseLockKeeperClocking<Replaced> for EtcdSingletonLock {
#[tracing::instrument(skip(self, _state), err)]
async fn clock(&mut self, _state: Replaced) -> LockStatesResult {
panic!(
eprintln!(
"Lost lock to another service instance: {}. Giving up...",
self.service_name
);
std::process::exit(128);
}
}

Expand Down

0 comments on commit f6479db

Please sign in to comment.