[SERVER-57784] TryUntilLoop Does Not Synchronize Destructor and Promise resolution Created: 17/Jun/21 Updated: 29/Oct/23 Resolved: 15/Oct/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Code |
| Affects Version/s: | None |
| Fix Version/s: | 5.2.0, 5.0.4, 5.1.0-rc2 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Luis Osta (Inactive) | Assignee: | Amirsaman Memaripour |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | servicearch-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: |
v5.1, v5.0
|
||||||||||||||||
| Steps To Reproduce: | Known Failing Commit - 8ef4580520429754f85003cdb9d126aede402dbd Replicating Code Diff
And run:
|
||||||||||||||||
| Sprint: | Service Arch 2021-10-18, Service Arch 2021-11-01 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Linked BF Score: | 144 | ||||||||||||||||
| Story Points: | 2 | ||||||||||||||||
| Description |
|
The current implementation of TryUntilLoop will resolve the promise and make the future ready before the function exits and hence before the destructor runs. This means that the member variables (executor, body, etc) are destroyed at an arbitrary time after the future is ready. Possible Solution:
Acceptance criteria: Reinvestigate the cause of |
| Comments |
| Comment by Githook User [ 19/Oct/21 ] |
|
Author: {'name': 'Amirsaman Memaripour', 'email': 'amirsaman.memaripour@mongodb.com', 'username': 'samanca'}Message: (cherry picked from commit 2bf37b1ac522b39e186388ea382a5a14c0636da6) |
| Comment by Githook User [ 19/Oct/21 ] |
|
Author: {'name': 'Amirsaman Memaripour', 'email': 'amirsaman.memaripour@mongodb.com', 'username': 'samanca'}Message: (cherry picked from commit 2bf37b1ac522b39e186388ea382a5a14c0636da6) |
| Comment by Githook User [ 15/Oct/21 ] |
|
Author: {'name': 'Amirsaman Memaripour', 'email': 'amirsaman.memaripour@mongodb.com', 'username': 'samanca'}Message: |
| Comment by Max Hirschhorn [ 29/Jun/21 ] |
|
matthew.saltz, joining the task executor at the end of the test case doesn't provide strong exception safety. See |
| Comment by Matthew Saltz (Inactive) [ 29/Jun/21 ] |
|
We discussed as a team and we think this is a test bug. It can be fixed by joining the executor at the end of the test. We're closing this ticket with the expectation that a new one will be opened for that BF. |