Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-12061

Do not silently ignore read errors when syncing a replica set node

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.6.6, 2.7.8
    • Affects Version/s: 2.4.8
    • Component/s: Replication, Stability
    • Labels:
      None
    • Minor Change

      When a new clean node is being added to a replica set, if the source for initial sync has corrupted data, it seems that we try to sync whatever we can, silently ignoring all the records we can not fetch.

      While this "best effort" behavior makes sense, it can lead to significant data inconsistency within the replica set. We should not ignore data access errors during initial sync.

      example behavior (PRIMARY is the node with corruption in dummy.acl namespace, SECONDARY is the newly synced secondary):

      X:SECONDARY> rs.slaveOk()
      X:SECONDARY> use dummy
      switched to db dummy
      X:SECONDARY> db.acl.count()
      101
      X:SECONDARY> exit
      bye
      AD-MAC10G:ff alexander$ mongo
      MongoDB shell version: 2.4.8
      connecting to: test
      X:PRIMARY> use dummy
      switched to db dummy
      X:PRIMARY> db.acl.count()
      10002
      X:PRIMARY> exit
      bye
      

            Assignee:
            milkie@mongodb.com Eric Milkie
            Reporter:
            alex.komyagin@mongodb.com Alexander Komyagin (Inactive)
            Votes:
            2 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: