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

duplicate key error on local.slaves

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 1.8.4, 2.0.1, 2.2.7, 2.4.10, 2.6.4
    • Component/s: Replication
    • Labels:
      None

      Current Workaround
      You can drop the slaves collection at any time and it will automatically re-generate as the slaves replicate.

      use local
      db.slaves.drop()
      

      Original Issue Description
      Sometimes replication causes duplicate key error on internal local.slaves collection. Kristina said they are benign but it would be good to get rid of them in the log.

      Mon Dec 12 09:09:59 [slaveTracking] User Assertion: 11000:E11000 duplicate key error index: local.slaves.$id dup key: { : ObjectId('4def89b415e7ee0aa29fd64b') }
      Mon Dec 12 09:09:59 [slaveTracking] update local.slaves query: { _id: ObjectId('4def89b415e7ee0aa29fd64b'), host: "10.90.47.183", ns: "local.oplog.rs" } update: { $set: { syncedTo: Timestamp 1323652648000|784 } } exception 11000 E11000 duplicate key error index: local.slaves.$id dup key: { : ObjectId('4def89b415e7ee0aa29fd64b') } 0ms
      Mon Dec 12 09:10:01 [slaveTracking] User Assertion: 11000:E11000 duplicate key error index: local.slaves.$id dup key: { : ObjectId('4def89aa201f4b0ab1a35fd5') }
      Mon Dec 12 09:10:01 [slaveTracking] update local.slaves query: { _id: ObjectId('4def89aa201f4b0ab1a35fd5'), host: "10.90.47.184", ns: "local.oplog.rs" } update: { $set: { syncedTo: Timestamp 1323652648000|784 } } exception 11000 E11000 duplicate key error index: local.slaves.$id dup key: { : ObjectId('4def89aa201f4b0ab1a35fd5') } 0ms
      

            Assignee:
            Unassigned Unassigned
            Reporter:
            tonyh Tony Hannan
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: