[SERVER-4473] duplicate key error on local.slaves Created: 12/Dec/11  Updated: 10/Dec/14  Resolved: 18/Aug/14

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: 1.8.4, 2.0.1, 2.2.7, 2.4.10, 2.6.4
Fix Version/s: None

Type: Improvement Priority: Minor - P4
Reporter: Tony Hannan Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Duplicate
is duplicated by SERVER-9004 mongodb crashed with E11000 duplicate... Closed
Related
related to SERVER-14540 Error Running mongotop after large co... Closed
related to SERVER-14550 Stop maintaining the local.slaves col... Closed
is related to SERVER-9315 local.slaves is not correctly maintai... Closed
Participants:

 Description   

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



 Comments   
Comment by Spencer Brody (Inactive) [ 18/Aug/14 ]

With SERVER-14550 completed we are no longer maintaining the local.slaves collection, so this bug no longer exists after 2.7.4.

Generated at Thu Feb 08 03:06:05 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.