-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Labels:None
Documentation Request Summary:
Not sure if we document our internal collections, but this change treats the config.transactions collection specially and only allows records with the following structure in it (all fields are mandatory):
- _id (BSON) - BSON serialization of a logical session id
- txnNum (int32) - The last transaction, which started on this session
- lastWriteOpTimeTs (Timestamp) - The timestamp of the last oplog entry written for this session
Deleting a document from this collection invalidates the session's transaction information, which means that all retryability information is lost for that session.
Dropping this collection will break the retryable writes feature and must never be done by users. The collection will be automatically recreated on stepUp/stepDown.
Engineering Ticket Description:
As implemented, direct writes to the config.transactions collection will invalidate the entire session transactions cache. This is not optimal, because session cleanup also performs direct writes to the sessions catalog and this can happen fairly frequently.
Instead, when a document is available for the direct write, we should try to extract the session id from it and only invalidate that session.
- documents
-
SERVER-31114 Perform targeted invalidation on direct writes to the `config.transactions` collection
- Closed
- is related to
-
DOCS-10733 Docs for SERVER-30407: Make findAndModify retryable
- Closed
-
DOCS-10736 Docs for SERVER-28918: Make CRUD write paths retryable
- Closed