Details
Description
The mechanism introduced in SERVER-68477 to resolve invalid expireAfterSeconds values and prevent unintended document deletions can potentially induce a deadlock during step-up with appropriate prepared transactions.
A prepared transaction which has a write to a collection "foo" will reacquire an IX lock on "foo" prior to running the index onStepUp method, where the TTLMonitor will attempt to acquire an X lock on a collection "foo" if it decides it needs to normalize its index spec. We cannot safely reverse the order of the operations.
As of this time we have not observed this deadlock in practice in any released builds, so we believe it to be extremely rare, and will be addressing it out of an abundance of caution.
Attachments
Issue Links
- related to
-
SERVER-81192 Introduce background maintenance task queue
-
- Closed
-