[SERVER-13616] "type 7" (OID) error when acquiring distributed lock for first time Created: 16/Apr/14  Updated: 11/Jul/16  Resolved: 20/Aug/14

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 2.4.12, 2.6.2, 2.7.0

Type: Bug Priority: Minor - P4
Reporter: Greg Studer Assignee: Randolph Tan
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-7161 Sharding will fail with non obvious e... Closed
Related
Operating System: ALL
Backport Completed:
Participants:
Linked BF Score: 0

 Description   

Lock is not taken, but an ugly and confusing assert is logged.

From test failure:

 m27001| 2014-04-01T21:07:24.400-0400 [conn11] Collection config.locks does not exist. Using EOF runner: query: { _id: "configUpgrade", state: 0 } sort: {} projection: {}
 m27001| 2014-04-01T21:07:24.400-0400 [conn11] update config.locks query: { _id: "configUpgrade", state: 0 } update: { $set: { state: 1, who: "ip-10-146-215-7:27003:1396400844:1804289383:mongosMain:846930886", process: "ip-10-146-215-7:27003:1396400844:1804289383", when: new Date(1396400844233), why: "upgrading config database to new format v5", ts: ObjectId('533b62cccf9c8a51fbe0c364') } } nscanned:0 nscannedObjects:0 nMatched:0 nModified:0 keyUpdates:0 numYields:0 locks(micros) w:218 0ms
...
 m27001| 2014-04-01T21:07:24.400-0400 [conn13] Database::_addNamespaceToCatalog ns: config.locks
...
 m27001| 2014-04-01T21:07:24.401-0400 [conn13] insert config.locks ninserted:1 keyUpdates:0 numYields:0 locks(micros) r:37 w:721 0ms

The first config upgrade lock document got inserted on the first config server (27000) by some non-27003 mongos - this caused the mongos at port 27003 to try to lock the initial lock document. On the second config server though (27001, as seen above), the mongos's update at port 27003 beat the initial lock document and so the update didn't apply. Crossing messages between servers is normal for distributed locks, but since this was the very first lock document created there was no "ts" field and the tournament was confused and errored.

Behavior has been like this for a long time.



 Comments   
Comment by Githook User [ 06/Oct/14 ]

Author:

{u'username': u'renctan', u'name': u'Randolph Tan', u'email': u'randolph@10gen.com'}

Message: SERVER-13616 "type 7" (OID) error when acquiring distributed lock for first time
(cherry picked from commit 6254a575a99d9eeda90b0712efd4486411591212)
Branch: v2.4
https://github.com/mongodb/mongo/commit/c62f9b697a0053155363621e2866dd121b5f66f2

Comment by Githook User [ 21/Aug/14 ]

Author:

{u'username': u'ehershey', u'name': u'Ernie Hershey', u'email': u'ernie.hershey@10gen.com'}

Message: Revert "SERVER-13616 "type 7" (OID) error when acquiring distributed lock for first time"

This reverts commit 50c95dfc9d9ab165cd5ab08707bfa0d6b191decd.
Branch: v2.4
https://github.com/mongodb/mongo/commit/7305c859899654cb134e61c3bc47e918c56e395e

Comment by Githook User [ 20/Aug/14 ]

Author:

{u'username': u'renctan', u'name': u'Randolph Tan', u'email': u'randolph@10gen.com'}

Message: SERVER-13616 "type 7" (OID) error when acquiring distributed lock for first time
(cherry picked from commit 6254a575a99d9eeda90b0712efd4486411591212)
Branch: v2.4
https://github.com/mongodb/mongo/commit/50c95dfc9d9ab165cd5ab08707bfa0d6b191decd

Comment by Githook User [ 15/May/14 ]

Author:

{u'username': u'renctan', u'name': u'Randolph Tan', u'email': u'randolph@10gen.com'}

Message: SERVER-13616 "type 7" (OID) error when acquiring distributed lock for first time
(cherry picked from commit 6254a575a99d9eeda90b0712efd4486411591212)
Branch: v2.6
https://github.com/mongodb/mongo/commit/f791b9d40151a5aacda4c82c87c7490463b8efa3

Comment by Githook User [ 23/Apr/14 ]

Author:

{u'username': u'renctan', u'name': u'Randolph Tan', u'email': u'randolph@10gen.com'}

Message: SERVER-13616 "type 7" (OID) error when acquiring distributed lock for first time
Branch: master
https://github.com/mongodb/mongo/commit/6254a575a99d9eeda90b0712efd4486411591212

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