The ReplBatcher thread reads from the storage engine here. This results in using AutoGetCollectionForReadCommand. The various rules of that helper allow the thread to read at kLastApplied.
This behavior can cause rollback to crash in debug builds. Specifically while reconstructing prepared transactions. This WT assertion fails when the prepare timestamp is older than any active readers. The ReplBatcher, however, may still be reading at kLastApplied.
- related to
-
SERVER-44906 Rollback should take global write lock while truncating oplog
- Backlog