From 7af86685e3909684eb792c4517be67076045a4da Mon Sep 17 00:00:00 2001 From: Jan Date: Fri, 8 Dec 2017 17:33:37 +0100 Subject: [PATCH] when upgrading from 3.1 LastHeartBeatAcked could also have been missing, when the 3.1 cluster had not run for long enough (#3974) --- arangod/Agency/Supervision.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/arangod/Agency/Supervision.cpp b/arangod/Agency/Supervision.cpp index 6e2227fc8b..f0b48e0fae 100644 --- a/arangod/Agency/Supervision.cpp +++ b/arangod/Agency/Supervision.cpp @@ -81,16 +81,20 @@ struct HealthRecord { version = 2; syncStatus = node("SyncStatus").getString(); if (node.has("SyncTime")) { - lastAcked = node("LastAcked").getString(); syncTime = node("SyncTime").getString(); } + if (node.has("LastAcked")) { + lastAcked = node("LastAcked").getString(); + } } else if (node.has("LastHeartbeatStatus")) { version = 1; syncStatus = node("LastHeartbeatStatus").getString(); if (node.has("LastHeartbeatSent")) { - lastAcked = node("LastHeartbeatAcked").getString(); syncTime = node("LastHeartbeatSent").getString(); } + if (node.has("LastHeartbeatAcked")) { + lastAcked = node("LastHeartbeatAcked").getString(); + } } if (node.has("Host")) { hostId = node("Host").getString();