-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Server Programmability
-
Fully Compatible
-
ALL
-
Programmability 2025-08-18, Programmability 2025-09-01, Programmability 2025-09-15, Programmability 2025-09-29, Programmability 2025-10-13
-
0
-
None
-
None
-
None
-
None
-
None
-
None
-
None
When recursing with the futures runtime (example below) using a multi-threaded executor, multiple threads in the executor can race to complete continuations before the "original" invoking thread can collapse the futures chain inside propagateResultTo. This breaches the depth limit inside `transitionToFinished` when run under a debug build, but does not otherwise appear to have correctness impacts.
Future<T> doWhile(executor, ...) {
// When this return statement completes, the thread that called
// doWhile will call propagateResultsTo.
// But if the executor completes the continuation before propagate
// completes, the futures chain builds instead of collapsing due
// to isJustForContinuation.
// When the iterations are fast enough and the thread pool large
// enough this temporary chaining breaches the depth limit on
// future_impl.h:438
return executor.schedule([&] {
return doWhile(executor, ...);
});
}
- is related to
-
SERVER-53500 Investigate making nested futures equivalent to chained continuations
-
- Backlog
-
- related to
-
SERVER-109550 doWhile uses nested futures to achieve asynchronous iteration
-
- Closed
-
-
SERVER-110479 Integrate Antithesis C++ Assertions
-
- Backlog
-