Skip to content

Commit

Permalink
Remove the peer from latestSentPeerSync_ when the peer is
Browse files Browse the repository at this point in the history
Summary:
Seeing the following in logs:

Oct 04 16:28:59 e00.0001.node1 openr[113]: I1004 16:28:59.347575   141 KvStore.cpp:1323] Sync response received from e00.0033.node33::7::TCP::CMD::LOCAL with 0 key value pairs which incured 0 key-value updates
Oct 04 16:29:12 e00.0001.node1 openr[113]: V1004 16:29:12.720877   121 NetlinkMessage.cpp:366] Asynchronous Neighbor Event: neighbor fe80::f8a6:3ff:fe90:b32f reachable Yes, intf-index 4, mac-addr fa:a6:03:90:b3:2f, state stale
Oct 04 16:29:47 e00.0001.node1 openr[113]: I1004 16:29:47.337414   141 KvStore.cpp:1380] Requesting full-sync from e00.0033.node33
Oct 04 16:29:47 e00.0001.node1 openr[113]: I1004 16:29:47.349166   141 KvStore.cpp:836] 2 full dump sync in progress
Oct 04 16:29:47 e00.0001.node1 openr[113]: I1004 16:29:47.352319   141 KvStore.cpp:849] Scheduling full sync after 10000ms.
Oct 04 16:29:47 e00.0001.node1 openr[113]: I1004 16:29:47.362323   141 KvStore.cpp:1323] Sync response received from e00.0033.node33::7::TCP::CMD::LOCAL with 7 key value pairs which incured 2 key-value updates
Oct 04 16:30:04 e00.0001.node1 openr[113]: V1004 16:30:04.432837   121 NetlinkMessage.cpp:366] Asynchronous Neighbor Event: neighbor fe80::f8a6:3ff:fe90:b32f reachable Yes, intf-index 4, mac-addr fa:a6:03:90:b3:2f, state probe
Oct 04 16:30:04 e00.0001.node1 openr[113]: V1004 16:30:04.432895   121 NetlinkMessage.cpp:366] Asynchronous Neighbor Event: neighbor fe80::f8a6:3ff:fe90:b32f reachable Yes, intf-index 4, mac-addr fa:a6:03:90:b3:2f, state reachable
Oct 04 16:30:35 e00.0001.node1 openr[113]: I1004 16:30:35.341146   141 KvStore.cpp:1380] Requesting full-sync from e00.0033.node33
Oct 04 16:30:35 e00.0001.node1 openr[113]: I1004 16:30:35.344977   141 KvStore.cpp:836] 2 full dump sync in progress
Oct 04 16:30:35 e00.0001.node1 openr[113]: I1004 16:30:35.345535   141 KvStore.cpp:849] Scheduling full sync after 10000ms.

This can happen when the peers for which the request is pending have gone.
When deleting peers in delPeers() API also delete from latestSentPeerSync_.

Reviewed By: saifhhasan

Differential Revision: D17793566

fbshipit-source-id: 450f01bdf8c8e4d4d5e0768a237e10f69a81b8aa
  • Loading branch information
Mahesh Maddikayala authored and facebook-github-bot committed Oct 8, 2019
1 parent d01b75d commit b65a68e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions openr/kvstore/KvStore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -830,6 +830,10 @@ KvStoreDb::delPeers(std::vector<std::string> const& peers) {
}

peersToSyncWith_.erase(peerName);
auto const& peerCmdSocketId = it->second.second;
if (latestSentPeerSync_.count(peerCmdSocketId)) {
latestSentPeerSync_.erase(peerCmdSocketId);
}
peers_.erase(it);
}

Expand Down

0 comments on commit b65a68e

Please sign in to comment.