[SERVER-37496] The balancer shouldn't register a shutdown task after the process is multithreaded Created: 05/Oct/18 Updated: 29/Oct/23 Resolved: 23/Oct/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | 3.4.17, 3.6.8, 4.0.3, 4.1.3 |
| Fix Version/s: | 3.4.19, 3.6.9, 4.0.4, 4.1.5 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Jack Mulrow | 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: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Operating System: | ALL | ||||||||
| Backport Requested: |
v4.0, v3.6, v3.4
|
||||||||
| Sprint: | Sharding 2018-11-05 | ||||||||
| Participants: | |||||||||
| Linked BF Score: | 0 | ||||||||
| Description |
|
The balancer registers a shutdown task when it is created, but this happens after the mongod process is multithreaded, so it's possible for the server to be shutting down when the task is registered, which triggers this invariant. Instead, we should probably check if the balancer exists in shutdownTask() defined in db.cpp and shut it down if it does, similar to what's done for other components. |
| Comments |
| Comment by Githook User [ 20/Nov/18 ] |
|
Author: {'name': 'Jack Mulrow', 'email': 'jack.mulrow@mongodb.com', 'username': 'jsmulrow'}Message: (cherry picked from commit 871f1234c72f3f390f81dc31fd8a95d8bc69cf91) |
| Comment by Githook User [ 29/Oct/18 ] |
|
Author: {'name': 'Jack Mulrow', 'email': 'jack.mulrow@mongodb.com', 'username': 'jsmulrow'}Message: (cherry picked from commit 871f1234c72f3f390f81dc31fd8a95d8bc69cf91) |
| Comment by Githook User [ 29/Oct/18 ] |
|
Author: {'name': 'Jack Mulrow', 'email': 'jack.mulrow@mongodb.com', 'username': 'jsmulrow'}Message: (cherry picked from commit 871f1234c72f3f390f81dc31fd8a95d8bc69cf91) |
| Comment by Githook User [ 23/Oct/18 ] |
|
Author: {'name': 'Jack Mulrow', 'email': 'jack.mulrow@mongodb.com', 'username': 'jsmulrow'}Message: |