Tips and Tricks

agirbal edited this page Sep 28, 2011 · 2 revisions

Seeing data inconsistencies between replicas and fixing

When a replica set has been running for a long time, and replication was not always smooth (e.g. server crash, replication stall) it is possible that servers do not have exactly the same data.

To compare replicas do following:

  • obtain a mongo instance to the replica set
  • click on the replica node, then "Tools / Compare Replicas"
  • choose the stat you want to compare.

You will obtain a report showing any differences between replicas. Note that it is often normal that the size of data in collection differs, due to document padding.