1
0
Fork 0

when upgrading from 3.1 LastHeartBeatAcked could also have been missing, when the 3.1 cluster had not run for long enough (#3974)

This commit is contained in:
Jan 2017-12-08 17:33:37 +01:00 committed by GitHub
parent cec8676248
commit 7af86685e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 2 deletions

View File

@ -81,16 +81,20 @@ struct HealthRecord {
version = 2; version = 2;
syncStatus = node("SyncStatus").getString(); syncStatus = node("SyncStatus").getString();
if (node.has("SyncTime")) { if (node.has("SyncTime")) {
lastAcked = node("LastAcked").getString();
syncTime = node("SyncTime").getString(); syncTime = node("SyncTime").getString();
} }
if (node.has("LastAcked")) {
lastAcked = node("LastAcked").getString();
}
} else if (node.has("LastHeartbeatStatus")) { } else if (node.has("LastHeartbeatStatus")) {
version = 1; version = 1;
syncStatus = node("LastHeartbeatStatus").getString(); syncStatus = node("LastHeartbeatStatus").getString();
if (node.has("LastHeartbeatSent")) { if (node.has("LastHeartbeatSent")) {
lastAcked = node("LastHeartbeatAcked").getString();
syncTime = node("LastHeartbeatSent").getString(); syncTime = node("LastHeartbeatSent").getString();
} }
if (node.has("LastHeartbeatAcked")) {
lastAcked = node("LastHeartbeatAcked").getString();
}
} }
if (node.has("Host")) { if (node.has("Host")) {
hostId = node("Host").getString(); hostId = node("Host").getString();