[SERVER-39169] Add testing-only support for doing snapshot reads outside of a transaction Created: 24/Jan/19  Updated: 29/Oct/23  Resolved: 11/Feb/19

Status: Closed
Project: Core Server
Component/s: Testing Infrastructure
Affects Version/s: None
Fix Version/s: 4.1.8

Type: New Feature Priority: Major - P3
Reporter: Max Hirschhorn Assignee: Max Hirschhorn
Resolution: Fixed Votes: 0
Labels: tig-dataconsistency
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-39372 Make secondary lock acquisition for D... Closed
is depended on by SERVER-39321 Re-enable the CheckReplDBHashInBackgr... Closed
Problem/Incident
causes SERVER-54899 Pass in point-in-time value used for ... Closed
Related
related to SERVER-40589 find command should validate $_inter... Closed
related to SERVER-39565 Add 'requires_document_locking' tag t... Closed
is related to SERVER-39660 AutoGetCollectionForRead should throw... Closed
is related to SERVER-34778 Add support for specifying atClusterT... Closed
is related to SERVER-34779 Check the dbhash periodically in a ne... Closed
is related to SERVER-39139 Remove testing support for secondary ... Closed
Backwards Compatibility: Fully Compatible
Sprint: STM 2019-02-11, STM 2019-02-25
Participants:
Linked BF Score: 53

 Description   

Testing-only support for running transactions that only do reads on secondaries is going away with SERVER-39139 and the CheckReplDBHashInBackground hook is being disabled along with it. We'd like to retain the ability to detect transient data inconsistency failures (e.g. related to timestamping differences between the primary and secondary of a replica set) that have been resolved by the time we've finished waiting for all operations to have replicated.

A testing-only query option should be introduced to call RecoveryUnit::setTimestampReadSource() with a supplied clusterTime to the find and dbHash commands. The run_check_repl_dbhash_background.js hook should be update to use this new option for getting the dbhash of a particular snapshot and computing the diff between replica set members should a mismatch arise.

Some care will need to be taken to handle (e.g. by retrying) the cursor getting killed as a result the collection or an index on the collection being dropped when attempting to compute the diff.

CC judah.schvimer, tess.avitabile



 Comments   
Comment by Githook User [ 11/Feb/19 ]

Author:

{'name': 'Max Hirschhorn', 'email': 'max.hirschhorn@mongodb.com', 'username': 'visemet'}

Message: SERVER-39169 Add $_internalReadAtClusterTime option to find and dbHash.

The new $_internalReadAtClusterTime option replaces all usages of
running the dbHash command inside of a multi-statement transaction. It
can be used to read from a consistent snapshot in place of specifying an
atClusterTime read concern.

Unlike multi-statement transactions, the new $_internalReadAtClusterTime
option doesn't cause locks to be left on the server after returning a
network response. It instead restores the snapshot to read from as part
of handling the request.
Branch: master
https://github.com/mongodb/mongo/commit/9db1a8dffe753808bea0d8c47d9fc959eaea9ea0

Generated at Thu Feb 08 04:51:14 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.