[SERVER-34649] Return a bad status when the MovePrimarySourceManager receives a bad return from commitMovePrimary Created: 24/Apr/18 Updated: 29/Oct/23 Resolved: 26/Apr/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | 3.7.5 |
| Fix Version/s: | 4.0.0-rc0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Esha Maharishi (Inactive) | Assignee: | Blake Oler |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||
| Operating System: | ALL | ||||||||||||||
| Steps To Reproduce: |
|
||||||||||||||
| Sprint: | Sharding 2018-05-07 | ||||||||||||||
| Participants: |
| Description |
|
I would expect, from the MovePrimarySourceManager::commitOnConfig() code, that if the commitMovePrimary command against the config server fails, then the donor shard primary will fassert. But, that doesn't seem to be the case (see repro). It's a separate issue whether we actually want the donor shard primary to fassert blindly here. We particularly may not want to it to fassert blindly, because a config.databases entry that's missing a database version will cause the commitMovePrimary to fail (which can happen if someone directly inserts into config.databases). EDIT: It turns out that the fassert does not work. We will just uassert instead. |
| Comments |
| Comment by Githook User [ 26/Apr/18 ] |
|
Author: {'email': 'blake.oler@mongodb.com', 'username': 'BlakeIsBlake', 'name': 'Blake Oler'}Message: |
| Comment by Blake Oler [ 24/Apr/18 ] |
|
It turns out that the fassert doesn't work at all, due to a bug nobody catched. I will add a uassert to make sure that we don't blindly succeed if a commit fails. |