From c6f2dd7e8e1fbacca1f566b35ffc9f358b88de0a Mon Sep 17 00:00:00 2001 From: WenyXu Date: Fri, 22 Sep 2023 09:59:12 +0000 Subject: [PATCH] fix: trigger to send heartbeat immediately after fail --- src/datanode/src/heartbeat.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/datanode/src/heartbeat.rs b/src/datanode/src/heartbeat.rs index 313506a86347..60a6fd8a3b77 100644 --- a/src/datanode/src/heartbeat.rs +++ b/src/datanode/src/heartbeat.rs @@ -246,6 +246,8 @@ impl HeartbeatTask { Ok(new_tx) => { info!("Reconnected to metasrv"); tx = new_tx; + // Triggers to send heartbeat immediately. + sleep.as_mut().reset(Instant::now()); } Err(e) => { error!(e;"Failed to reconnect to metasrv!");