]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#1403] Added a commment in the ha_service
authorMarcin Siodelski <marcin@isc.org>
Tue, 21 Sep 2021 12:22:00 +0000 (14:22 +0200)
committerMarcin Siodelski <marcin@isc.org>
Tue, 21 Sep 2021 12:22:00 +0000 (14:22 +0200)
Per review comments.

src/hooks/dhcp/high_availability/ha_service.cc

index b57cd68fb474437cd881fe519a90945e4f86b660..1192544adfce7ccdc1a876c1aa83a7aa08872a1e 100644 (file)
@@ -1602,6 +1602,14 @@ HAService::processHAReset() {
 void
 HAService::asyncSendHeartbeat() {
     HAConfig::PeerConfigPtr partner_config = config_->getFailoverPeerConfig();
+
+    // If the sync_complete_notified_ is true it means that the partner
+    // notified us that it had completed lease database synchronization.
+    // We confirm that the partner is operational by sending the heartbeat
+    // to it. Regardless if the partner responds to our heartbeats or not,
+    // we should clear this flag. But, since we need the current value in
+    // the async call handler, we save it in the local variable before
+    // clearing it.
     bool sync_complete_notified = sync_complete_notified_;
     sync_complete_notified_ = false;