[SERVER-9913] unprotected exception path in migrate critical section Created: 12/Jun/13  Updated: 11/Jul/16  Resolved: 13/Jun/13

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: 2.5.0
Fix Version/s: 2.4.6, 2.5.1

Type: Bug Priority: Major - P3
Reporter: Greg Studer Assignee: Greg Studer
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Related
Backwards Compatibility: Fully Compatible
Operating System: ALL
Steps To Reproduce:

Have a new connect or auth fail to the TO shard immediately before sending _recvChunkCommit.

Participants:

 Description   

The ScopedDbConnection constructor can throw if it needs to create a new connection and something goes wrong. The constructor isn't protected by a try/catch when we send our _recvChunkCommit command, so this can rarely fail in a way that does not reset shard version.

Manifests as "shard global version for collection is higher than trying to set" messages. Workaround is to stepDown or restart the shard primary.



 Comments   
Comment by auto [ 02/Aug/13 ]

Author:

{u'username': u'gregstuder', u'name': u'Greg Studer', u'email': u'greg@10gen.com'}

Message: SERVER-9913 protect ScopedDbConn constructor in migrate critical section
Branch: v2.4
https://github.com/mongodb/mongo/commit/80f1630fc9a1603de5835690e49ac5fa0f4509e4

Comment by auto [ 13/Jun/13 ]

Author:

{u'username': u'gregstuder', u'name': u'Greg Studer', u'email': u'greg@10gen.com'}

Message: SERVER-9913 protect ScopedDbConn constructor in migrate critical section
Branch: master
https://github.com/mongodb/mongo/commit/34906754037982bd2559c0e9820444c865cb9574

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