Skip to content

Instantly share code, notes, and snippets.

@miguelcma
Created July 10, 2014 11:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save miguelcma/c9a4043daa5a3f73d363 to your computer and use it in GitHub Desktop.
Save miguelcma/c9a4043daa5a3f73d363 to your computer and use it in GitHub Desktop.
MongoDB primary node duplicate key errors
2014-07-10T11:55:23.225+0000 [slaveTracking] processing update : query: { _id: ObjectId('53445ccb8e0ae053848b25c6'), config: { _id: 1, host: "10.0.0.11:27017", priority: 0.4 }, ns: "local.oplog.rs" } updated: { $set: { syncedTo: Timestamp 1404993323000|4 } } god: 0 upsert: 1 multi: 0 callLogOp: 1 fromMigration: 0 fromReplications: 0
2014-07-10T11:55:23.225+0000 [slaveTracking] Relevant index 0 is kp: { _id: 1 } io: { v: 1, name: "_id_", key: { _id: 1 }, ns: "local.slaves" }
2014-07-10T11:55:23.225+0000 [slaveTracking] Only one plan is available; it will be run but will not be cached. query: { _id: ObjectId('53445ccb8e0ae053848b25c6'), config: { _id: 1, host: "10.0.0.11:27017", priority: 0.4 }, ns: "local.oplog.rs" } sort: {} projection: {}, planSummary: IXSCAN { _id: 1 }
2014-07-10T11:55:23.225+0000 [slaveTracking] update validate options -- updatedFields: Fields:[ ] immutableAndSingleValueFields.size:0 fromRepl: 0 validate:1
2014-07-10T11:55:23.225+0000 [slaveTracking] update validate options -- updatedFields: Fields:[ syncedTo,] immutableAndSingleValueFields.size:0 fromRepl: 0 validate:1
2014-07-10T11:55:23.225+0000 [slaveTracking] User Assertion: 11000:E11000 duplicate key error index: local.slaves.$_id_ dup key: { : ObjectId('53445ccb8e0ae053848b25c6') }
2014-07-10T11:55:23.225+0000 [slaveTracking] User Assertion: 11000:E11000 duplicate key error index: local.slaves.$_id_ dup key: { : ObjectId('53445ccb8e0ae053848b25c6') }
2014-07-10T11:55:23.225+0000 [slaveTracking] IndexCatalog::indexRecord failed: 11000 E11000 duplicate key error index: local.slaves.$_id_ dup key: { : ObjectId('53445ccb8e0ae053848b25c6') }
2014-07-10T11:55:23.225+0000 [slaveTracking] User Assertion: 11000:insertDocument :: caused by :: 11000 E11000 duplicate key error index: local.slaves.$_id_ dup key: { : ObjectId('53445ccb8e0ae053848b25c6') }
2014-07-10T11:55:23.226+0000 [slaveTracking] update local.slaves query: { _id: ObjectId('53445ccb8e0ae053848b25c6'), config: { _id: 1, host: "10.0.0.11:27017", priority: 0.4 }, ns: "local.oplog.rs" } update: { $set: { syncedTo: Timestamp 1404993323000|4 } } nscanned:0 nscannedObjects:0 nModified:0 fastmodinsert:1 upsert:1 keyUpdates:0 exception: insertDocument :: caused by :: 11000 E11000 duplicate key error index: local.slaves.$_id_ dup key: { : ObjectId('53445ccb8e0ae053848b25c6') } code:11000 numYields:0 locks(micros) w:582 0ms
@mariusmocanu19
Copy link

fastmodinsert:1 upsert:1 keyUpdates:0 exception: insertDocument :: caused by :: 11000 E11000 duplicate key error index: local.slaves.$id dup key

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment