I am upgrading my MongoDB replica set from 3.0.15 to 3.2.22. And when I start up a node with the 3.2.22 binaries, I keep seeing the below for lastHeartbeatMessage whenever I run rs.status()
I see this message even though that node is showing up as SECONDARY and there is nothing in the log files that say that something is wrong. And whenever I insert a new document into the PRIMARY, I can see the same document in the SECONDARY as well and the above message then disappears. Is there a reason why I am seeing the above message to start with?
Answer
There is a known issue affecting MongoDB 3.2 (SERVER-20144) where a stale lastHeartbeatMessage may not be cleared until new data is replicated from the primary. Inserting or updating data should resolve this.
I believe this has been mitigated by replication changes in MongoDB 3.4, which performs periodic no-op writes if a cluster is idle for more than 10 seconds (per SERVER-23892). The 3.4 no-op replication change was part of the spec for Max Staleness which allows drivers to estimate the staleness of secondaries in order to support a new maxStalenessSeconds read preference option.
Since the MongoDB 3.2 release series reached end of life in September, 2018 I would strongly recommend upgrading to a newer and actively supported production release.
No comments:
Post a Comment