[SERVER-60038] Ban setWindowFields in transaction with read concern snapshot Created: 17/Sep/21  Updated: 29/Oct/23  Resolved: 22/Sep/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 5.0.4, 5.1.0-rc0

Type: Bug Priority: Major - P3
Reporter: Ted Tuckman Assignee: Ted Tuckman
Resolution: Fixed Votes: 0
Labels: query-director-triage
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Documented
is documented by DOCS-14815 Investigate changes in SERVER-60038: ... Closed
Related
is related to SERVER-59772 Enable setWindowFields in transaction... Closed
is related to SERVER-60086 Currently don't check ReadConcern in ... Closed
is related to SERVER-60167 Allow $setWindowFields in transaction... Closed
Backwards Compatibility: Minor Change
Operating System: ALL
Backport Requested:
v5.0
Sprint: QO 2021-10-04
Participants:

 Description   

Until SERVER-59772 is resolved, the combination does not work and can crash the server. This ticket tracks a temporary mitigation to error on the combination instead.



 Comments   
Comment by Vivian Ge (Inactive) [ 06/Oct/21 ]

Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it’s been triggered. For more active release information, please keep an eye on #server-release. Thank you!

Comment by Githook User [ 04/Oct/21 ]

Author:

{'name': 'Ted Tuckman', 'email': 'ted.tuckman@mongodb.com', 'username': 'TedTuckman'}

Message: SERVER-60038 Ban $setWindowFields in transactions

(cherry-picked from commit (2e5383fbcb8f8def38d7291f44556bb25e187d7e)
(cherry-picked from commit (28a41e017b9562a83dd448bff93c577ffc4e082c)
Branch: v5.0
https://github.com/mongodb/mongo/commit/c1adcced7257989a31c97cea7c26607b3c65acd9

Comment by Charlie Swanson [ 22/Sep/21 ]

I think it's worth looking into allowing it when allowDiskUse is false. ted.tuckman could you explore that? It looks like based on your patch that the place we make the assertion doesn't currently have knowledge of the allowDiskUse parameter - hopefully it wouldn't be too bad to plumb it through.

Comment by Ted Tuckman [ 22/Sep/21 ]

I don't think we want to support spillToDisk in transactions at all because using abandonSnapshot() in a transaction is a little sketchy. We could allow it if allowDiskUse is false though.

Comment by Nicholas Zolnierz [ 22/Sep/21 ]

Per the commit message above, we ended up banning $setWindowFields altogether in a transaction. This is pretty unfortunate for users, especially ones who don't need to use disk. ted.tuckmancharlie.swanson should we improve this experience by only banning if there's a chance that we'll spill (e.g. allowDiskUse: true) and/or fail at the time of spilling if the readConcern is snapshot?

Comment by Githook User [ 22/Sep/21 ]

Author:

{'name': 'Ted Tuckman', 'email': 'ted.tuckman@mongodb.com', 'username': 'TedTuckman'}

Message: SERVER-60038 Ban $setWindowFields in transactions
Branch: master
https://github.com/mongodb/mongo/commit/2e5383fbcb8f8def38d7291f44556bb25e187d7e

Comment by Charlie Swanson [ 20/Sep/21 ]

cc steve.la for visibility. We are waiting on storage execution for a fix (SERVER-59772 is blocked on another ticket). I'm scheduling this ticket in the meantime to prevent the bad behavior.

Generated at Thu Feb 08 05:48:48 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.