[SERVER-62682] PrimaryOnlyService Does Not Call _rebuildCV.notify_all() leading to calls to waitForConditionOrInterrupt not being triggered Created: 14/Jan/22 Updated: 29/Oct/23 Resolved: 26/Jan/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Code |
| Affects Version/s: | None |
| Fix Version/s: | 5.3.0, 5.2.1, 5.0.7 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Luis Osta (Inactive) | Assignee: | Luis Osta (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | sharding-nyc-subteam1 | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||
| Backport Requested: |
v5.2, v5.0
|
||||||||||||||||||||
| Steps To Reproduce: | Te test included in the PR 'LookUpInstanceHangsForever' reproduces the issue. |
||||||||||||||||||||
| Sprint: | Sharding 2022-01-24, Sharding 2022-02-07 | ||||||||||||||||||||
| Participants: | |||||||||||||||||||||
| Linked BF Score: | 35 | ||||||||||||||||||||
| Story Points: | 2 | ||||||||||||||||||||
| Description |
|
Since PrimaryOnlyService does not adhere to the contract of notifying the users of the condition variable whenever the underlying _state variable changes, its possible for its users such as lookUpInstance to end up waiting forever on the condition or interrupt For instance on step down, the function updates the _state to kPaused but does not notify the condition variable Adding a _rebuildCV.notify_all() after every update to _state should fix this issue. |
| Comments |
| Comment by Githook User [ 26/Jan/22 ] |
|
Author: {'name': 'Luis Osta', 'email': 'luis.osta@mongodb.com', 'username': 'LuisOsta'}Message: (cherry picked from commit fd6fb9e6a49955828c12355e33edf8b328e44a43) |
| Comment by Githook User [ 26/Jan/22 ] |
|
Author: {'name': 'Luis Osta', 'email': 'luis.osta@mongodb.com', 'username': 'LuisOsta'}Message: (cherry picked from commit fd6fb9e6a49955828c12355e33edf8b328e44a43) |
| Comment by Githook User [ 26/Jan/22 ] |
|
Author: {'name': 'Luis Osta', 'email': 'luis.osta@mongodb.com', 'username': 'LuisOsta'}Message: |