Skip to content

Commit

Permalink
No heartbeat timeout for debugging purposes (openzfs#434)
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Dagnelie <[email protected]>
  • Loading branch information
pcd1193182 authored Sep 15, 2021
1 parent ed34b91 commit ed01c07
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions cmd/zfs_object_agent/zettaobject/src/heartbeat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,7 @@ pub async fn start_heartbeat(object_access: ObjectAccess, id: Uuid) -> Heartbeat
lease_duration: *LEASE_DURATION,
id,
};
let result = heartbeat
.put_timeout(&object_access, Some(*WRITE_TIMEOUT))
.await;
let result = heartbeat.put_timeout(&object_access, None).await;
if lease_timed_out(&last_heartbeat) {
panic!("Suspending pools due to lease timeout");
}
Expand All @@ -199,9 +197,11 @@ fn lease_timed_out(last_heartbeat: &Option<HeartbeatPhys>) -> bool {
.duration_since(heartbeat.timestamp)
.unwrap_or(heartbeat.lease_duration);
if since > 2 * heartbeat.lease_duration / 3 {
warn!("Heartbeat delay: {:?}", since);
warn!("Extreme heartbeat delay: {:?}", since);
} else if since > heartbeat.lease_duration / 3 {
info!("Heartbeat delay: {:?}", since);
info!("Long heartbeat delay: {:?}", since);
} else {
debug!("Short heartbeat delay: {:?}", since);
}
since >= heartbeat.lease_duration
}
Expand Down

0 comments on commit ed01c07

Please sign in to comment.