[SERVER-34113] Remove all support for snapshot reads outside of multi-document transactions Created: 23/Mar/18  Updated: 29/Oct/23  Resolved: 19/Jun/18

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: None
Fix Version/s: 4.0.1, 4.1.1

Type: Task Priority: Major - P3
Reporter: James Wahlin Assignee: Xiangyu Yao (Inactive)
Resolution: Fixed Votes: 0
Labels: nyc
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Related
related to SERVER-35704 Tag readConcern_snapshot.js with 'use... Closed
is related to SERVER-33838 Replace setStashedCursor and hasStash... Closed
is related to SERVER-34095 Restrict snapshot reads to multi-stat... Closed
Backwards Compatibility: Fully Compatible
Backport Requested:
v4.0
Sprint: Storage NYC 2018-06-18, Storage NYC 2018-07-02
Participants:

 Description   

This is a follow on to SERVER-34095 which disallows snapshot reads outside of multi-document transactions unless explicitly enabled for test purposes. This work should be scheduled for the 4.1 development cycle.



 Comments   
Comment by Githook User [ 10/Jul/18 ]

Author:

{'username': 'xy24', 'name': 'Xiangyu Yao', 'email': 'xiangyu.yao@mongodb.com'}

Message: SERVER-34113 Remove all support for snapshot reads outside multi-document transactions

(cherry picked from commit 1871507cdbdd492abee785076203467d20e0e716)
Branch: v4.0
https://github.com/mongodb/mongo/commit/86439f3cd32a4bf7bc0aaf9f550b0f0fd9dc2e8e

Comment by Githook User [ 19/Jun/18 ]

Author:

{'username': 'xy24', 'name': 'Xiangyu Yao', 'email': 'xiangyu.yao@mongodb.com'}

Message: SERVER-34113 Remove all support for snapshot reads outside multi-document transactions
Branch: master
https://github.com/mongodb/mongo/commit/1871507cdbdd492abee785076203467d20e0e716

Comment by Tess Avitabile (Inactive) [ 12/Jun/18 ]

Yes, we should replace inSnapshotReadOrMultiDocumentTransaction() with inMultiDocumentTransaction().

Comment by Xiangyu Yao (Inactive) [ 12/Jun/18 ]

tess.avitabile Do we still need to remove inSnapshotReadOrMultiDocumentTransaction()? or convert it to inMultiDocumentTransaction()?

Comment by Tess Avitabile (Inactive) [ 01/Jun/18 ]

It might break some transactions tests when you remove this clause. DBDirectClient calls in transactions are succeeding because test commands are enabled. This is being worked on in SERVER-34764. Just wanted to give you a heads up.

Comment by Louis Williams [ 15/May/18 ]

SERVER-34443 Added a TODO comment here to remove a check when setting a ReadSource on a RecoveryUnit in an active WT transaction. Commands like 'group' that use DBDirectClient and are allowed within snapshot reads, but not multi-document transactions, violate this invariant. 

Comment by Tess Avitabile (Inactive) [ 08/May/18 ]

We should also make sure that any command that is not supported in transactions does not claim to support snapshot read concern in supportsReadConcern.

Comment by Maria van Keulen [ 02/Apr/18 ]

SERVER-34239 added a TODO comment about replacing a check for transaction number/logical session id with Session::inMultiDocumentTransaction(). This should be addressed here.

Comment by Tess Avitabile (Inactive) [ 23/Mar/18 ]

As part of this work, we should:

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