-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Fully Compatible
-
QE 2023-02-06, QE 2023-02-20, QE 2023-03-06, QE 2023-03-20, QE 2023-04-03, QE 2023-04-17
-
135
The change collection when writing documents takes AllowLockAcquisitionOnTimestampedUnitOfWork. The AllowLockAcquisitionOnTimestampedUnitOfWork has some implications, for eg. it stalls replications. This ticket is about exploring solutions to avoid using it.
One solution was to take the change collection within the context of the AutoGetCollection. This POC was done here but it was complicated and hard to reason for deadlocks.
Another solution is to use an atomic flag. The insertion code path takes the reader lock and the drop collection takes the writer lock. The insertion logic will not block each other because they are using the reader lock. The drop and insertion code path will be synchronized using the writer lock. It should be noted that the insertions to the change collection are happening within the context of the timestamped unit of work, so they themselves are synchronized.
- has to be done after
-
SERVER-67267 Inject tenant Ids for change stream multitenant replica set passthrough
- Closed
- has to be done before
-
SERVER-71327 Get rid of using AllowLockAcquisitionOnTimestampedUnitOfWork in change stream pre-images write scenarios
- Backlog
- is related to
-
SERVER-66639 Write manager class for pre-image collection.
- Closed