[SERVER-22239] wait for replication after duplicate key error from insert operations Created: 20/Jan/16  Updated: 19/Nov/16  Resolved: 18/Feb/16

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 3.2.4, 3.3.3

Type: Bug Priority: Major - P3
Reporter: Dianna Hohensee (Inactive) Assignee: Dianna Hohensee (Inactive)
Resolution: Done Votes: 0
Labels: code-and-test
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Tested
is testing SERVER-22157 Force primary config server step down... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Completed:
Steps To Reproduce:

This bug is not consistent in appearing (showed up in one of two evergreen builds), but this is the build that provoked it: https://evergreen.mongodb.com/task/mongodb_mongo_master_enterprise_rhel_62_64_bit_sharding_csrs_continuous_config_stepdown_WT_a1313488c04d5f532044506c78f728bd9f742e7d_16_01_12_22_01_34

With the changes found in the build, run the following command:
python buildscripts/resmoke.py --executor=sharding_continuous_config_stepdown --storageEngine=wiredTiger -j4 jstests/sharding/dump_coll_metadata.js

Sprint: Sharding F (01/29/16), Sharding 10 (02/19/16), Sharding 11 (03/11/16)
Participants:
Linked BF Score: 0

 Description   

Caught this bug testing sharding_csrs_continuous_config_stepdown_WT suite with forced primary config server stepdown.

Log: https://logkeeper.mongodb.org/build/56958221be07c46e4dc77637/test/569582219041300b2719d2b6#L5946

Error message:

[js_test:dump_coll_metadata] 2016-01-12T22:46:19.709+0000 assert: command failed: {
[js_test:dump_coll_metadata] 2016-01-12T22:46:19.709+0000 	"ok" : 0,
[js_test:dump_coll_metadata] 2016-01-12T22:46:19.710+0000 	"errmsg" : "Creating first chunks failed: DuplicateKey error :: caused by :: DuplicateKey: E11000 duplicate key error collection: config.chunks index: _id_ dup key: { : \"foo.bar-_id_MinKey\" } was returned after a retry attempt, but no documents were found. This means a concurrent change occurred together with the retries.",
[js_test:dump_coll_metadata] 2016-01-12T22:46:19.710+0000 	"code" : 11000
[js_test:dump_coll_metadata] 2016-01-12T22:46:19.710+0000 } : undefined
[js_test:dump_coll_metadata] 2016-01-12T22:46:19.710+0000 _getErrorWithCode@src/mongo/shell/utils.js:23:13
[js_test:dump_coll_metadata] 2016-01-12T22:46:19.710+0000 doassert@src/mongo/shell/assert.js:13:14
[js_test:dump_coll_metadata] 2016-01-12T22:46:19.710+0000 assert.commandWorked@src/mongo/shell/assert.js:242:5
[js_test:dump_coll_metadata] 2016-01-12T22:46:19.711+0000 @jstests/sharding/dump_coll_metadata.js:17:1
[js_test:dump_coll_metadata] 2016-01-12T22:46:19.711+0000 @jstests/sharding/dump_coll_metadata.js:4:2
[js_test:dump_coll_metadata] 2016-01-12T22:46:19.711+0000 
[js_test:dump_coll_metadata] 2016-01-12T22:46:19.711+0000 2016-01-12T22:46:19.671+0000 E QUERY    [thread1] Error: command failed: {
[js_test:dump_coll_metadata] 2016-01-12T22:46:19.711+0000 	"ok" : 0,
[js_test:dump_coll_metadata] 2016-01-12T22:46:19.712+0000 	"errmsg" : "Creating first chunks failed: DuplicateKey error :: caused by :: DuplicateKey: E11000 duplicate key error collection: config.chunks index: _id_ dup key: { : \"foo.bar-_id_MinKey\" } was returned after a retry attempt, but no documents were found. This means a concurrent change occurred together with the retries.",
[js_test:dump_coll_metadata] 2016-01-12T22:46:19.712+0000 	"code" : 11000
[js_test:dump_coll_metadata] 2016-01-12T22:46:19.713+0000 } : undefined :
[js_test:dump_coll_metadata] 2016-01-12T22:46:19.713+0000 _getErrorWithCode@src/mongo/shell/utils.js:23:13
[js_test:dump_coll_metadata] 2016-01-12T22:46:19.713+0000 doassert@src/mongo/shell/assert.js:13:14
[js_test:dump_coll_metadata] 2016-01-12T22:46:19.714+0000 assert.commandWorked@src/mongo/shell/assert.js:242:5
[js_test:dump_coll_metadata] 2016-01-12T22:46:19.714+0000 @jstests/sharding/dump_coll_metadata.js:17:1
[js_test:dump_coll_metadata] 2016-01-12T22:46:19.714+0000 @jstests/sharding/dump_coll_metadata.js:4:2
[js_test:dump_coll_metadata] 2016-01-12T22:46:19.714+0000 
[js_test:dump_coll_metadata] 2016-01-12T22:46:19.714+0000 failed to load: jstests/sharding/dump_coll_metadata.js

This does not appear to be caused by rollback (nothing in the logs about rollback).

Error comes from CatalogManagerReplicaSet::insertConfigDocument



 Comments   
Comment by Githook User [ 18/Feb/16 ]

Author:

{u'username': u'DiannaHohensee', u'name': u'Dianna Hohensee', u'email': u'dianna.hohensee@10gen.com'}

Message: SERVER-22239 DuplicateKey Error, update optime to latest after insert failure

(cherry picked from commit ee31993039163d1b0a055f90a8f76093e694d7dd)
Branch: v3.2
https://github.com/mongodb/mongo/commit/626080cb8eb8b336b660ebafc460b79aa8447685

Comment by Githook User [ 18/Feb/16 ]

Author:

{u'username': u'DiannaHohensee', u'name': u'Dianna Hohensee', u'email': u'dianna.hohensee@10gen.com'}

Message: SERVER-22239 DuplicateKey Error, update optime to latest after insert failure
Branch: master
https://github.com/mongodb/mongo/commit/ee31993039163d1b0a055f90a8f76093e694d7dd

Comment by Randolph Tan [ 08/Feb/16 ]

Happened in master build:

https://evergreen.mongodb.com/task/mongodb_mongo_master_enterprise_rhel_62_64_bit_sharding_csrs_continuous_config_stepdown_WT_21d4e1be28ac08bb4c8bea1b6f5cd733e0b27a17_16_02_08_16_35_30

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