-
Type: Improvement
-
Resolution: Won't Fix
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Service Arch
-
0
The motivation for this is to make a clean refactoring of the executor usage for BF-18913 and SERVER-51317. We do not cancel pending tasks in the transaction coordinator and they show up as memory leak.
Switching the transaction coordinator to use AsyncWorkScheduler for all tasks is not possible because it can block for a while. Right now we rely on the fact that Grid pool executor is not shutting down as explained in SERVER-51316.
We cannot use any global flag like globalInShutdownDeprecated() because it breaks the termination sequence.
Proposed solution:
Add one or several cancelation tokens specifically for onStepDown to be used in src/mongo/db/commands/shutdown_d.cpp and cancel them in proper order from stepDownForShutdown() and beginShutdown().
When the foundation is in I will wire the proper token to be used in the transaction coordinator as part of working on SERVER-51317.
- is depended on by
-
SERVER-67077 TransactionCoordinator uses both the Grid fixed executor and the executor on the AsyncWorkScheduler
- Open