When checking whether or not to read from the local snapshot (last applied timestamp) on a secondary, we restrict to clients where isFromUserConnection is true. This is to prevent a bug where rolled back index builds are still visible (similar to the invariant in BF-8258). See this patch build failure where the check for isFromUserConnection is removed:
The most likely cause is that rollback does not correctly rewind the last applied snapshot timestamp. We should evaluate how replication rolls back its timestamps and ensure that the local snapshot timestamp is correctly updated.
The solution should be for users of ShouldNotConflictWithSecondaryBatchApplication who opt-out of taking the PBWM lock should be able to read without a timestamp. This applies to the threads listed in the comments, with the addition of rsBackgroundSync.
- related to
-
SERVER-34343 Initial sync should not timestamp secondary indexes at the current 'clusterTime'
- Closed