[SERVER-66126] Clear Future/ExecutorFuture continuations as they run Created: 02/May/22 Updated: 20/Dec/23 |
|
| Status: | Open |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Matt Diener (Inactive) | Assignee: | Backlog - Service Architecture |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | techdebt | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||||||
| Assigned Teams: |
Service Arch
|
||||||||||||||||||||||||||||||||||||||||
| Sprint: | Service Arch 2022-05-16, Service Arch 2022-05-30, Service Arch 2022-06-13, Service Arch 2022-06-27, Service Arch 2022-07-11 | ||||||||||||||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||||||||||||||
| Linked BF Score: | 2 | ||||||||||||||||||||||||||||||||||||||||
| Description |
|
It has been reported to the Service Architecture team that destructor ordering of continuation chains is not well-understood among server developers. This has come up in Slack and issues have been logged:
After some investigation, we’ve determined that the semantics around when continuation lambdas get destroyed are difficult to predict. This is mainly because the current implementation does not explicitly define a point at which the user-provided function is no longer held. Our current understanding is represented by the matrix below. It represents the known combinations of conditions that can impact the way that continuation functions run, and hence the multiple code paths that can lead to different destructor orderings: This issue encompasses the entirety of the work involved in moving to guaranteed destructor semantics.
This task can be closed with the completion of step 5. |