[SERVER-37142] invariant failure during movePrimary during cleanup Created: 14/Sep/18  Updated: 29/Oct/23  Resolved: 24/Sep/18

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: 4.1.3
Fix Version/s: 4.0.4, 4.1.4

Type: Bug Priority: Major - P3
Reporter: Randolph Tan Assignee: Jack Mulrow
Resolution: Fixed Votes: 0
Labels: sharding-wfbf-day
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Related
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.0
Sprint: Sharding 2018-10-08
Participants:
Linked BF Score: 68

 Description   

One case is when clone hits an assertion here, so the cleanupOnError gets ran before setMovePrimarySourceManager was called.

This can easily be fixed by either:
1. Make cleanup no-op if sourceMgr doesn't exist
or
2. Move the scopedGuard after uassert (less future proof)



 Comments   
Comment by Githook User [ 19/Oct/18 ]

Author:

{'name': 'Jack Mulrow', 'email': 'jack.mulrow@mongodb.com', 'username': 'jsmulrow'}

Message: SERVER-37142 Make clearing the MovePrimarySourceManager a no-op if one doesn't exist

(cherry picked from commit ea15baf6412300c94bbe0e96f2865e58b0c7e637)
Branch: v4.0
https://github.com/mongodb/mongo/commit/d0901eca51284ce4bd30298d74b6f3fd5076aa24

Comment by Githook User [ 24/Sep/18 ]

Author:

{'name': 'Jack Mulrow', 'email': 'jack.mulrow@mongodb.com', 'username': 'jsmulrow'}

Message: SERVER-37142 Make clearing the MovePrimarySourceManager a no-op if one doesn't exist
Branch: master
https://github.com/mongodb/mongo/commit/ea15baf6412300c94bbe0e96f2865e58b0c7e637

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