[SERVER-42372] Reads against capped collections aren't banned within transactions Created: 24/Jul/19  Updated: 29/Oct/23  Resolved: 26/Jul/19

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: 4.2.0-rc2
Fix Version/s: 4.2.0-rc5, 4.3.1

Type: Bug Priority: Major - P3
Reporter: Tomer Yakir Assignee: Vesselina Ratcheva (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Documented
is documented by DOCS-12919 Investigate changes in SERVER-42372: ... Closed
Related
related to SERVER-47824 Ban transaction snapshot reads on cap... Closed
is related to SERVER-40321 Rolling back a prepared transaction o... Closed
is related to SERVER-40684 Ban transactions against capped colle... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.2
Sprint: Repl 2019-07-29, Repl 2019-08-12
Participants:

 Description   

On SERVER-40684 transactions were banned against capped collections.
Writes to capped collections were indeed blocked, but reads succeed.



 Comments   
Comment by Githook User [ 26/Jul/19 ]

Author:

{'name': 'Vesselina Ratcheva', 'email': 'vesselina.ratcheva@10gen.com', 'username': 'vessy-mongodb'}

Message: SERVER-42372 Ban findAndModify against capped collections in transactions

(cherry picked from commit 5f7471631d238fb3269fa0f2c3689ac62e93b61f)
Branch: v4.2
https://github.com/mongodb/mongo/commit/accbdf6fb4846639ce55de7f910ead365f748945

Comment by Githook User [ 26/Jul/19 ]

Author:

{'name': 'Vesselina Ratcheva', 'email': 'vesselina.ratcheva@10gen.com', 'username': 'vessy-mongodb'}

Message: SERVER-42372 Ban findAndModify against capped collections in transactions
Branch: master
https://github.com/mongodb/mongo/commit/5f7471631d238fb3269fa0f2c3689ac62e93b61f

Comment by Vesselina Ratcheva (Inactive) [ 25/Jul/19 ]

While doing the work for reads (which we're abandoning) I noticed that we had missed findAndModify when we originally banned writes. I'm repurposing this ticket to extend the ban to findAndModify and to also add testing coverage for our current behavior for reads. As per discussion with judah.schvimer I'm marking this ticket as GA again.

Comment by Judah Schvimer [ 25/Jul/19 ]

Ok great. vesselina.ratcheva, let's abandon this change since it adds unnecessary risk/work. Can you please just add a test that ensures we maintain this behavior or only change it intentionally in the future?

Comment by Alyson Cabral (Inactive) [ 25/Jul/19 ]

I'm ok with reads succeeding and writes failing. We'll need to update the docs. tomer.yakir any objections?

 

Comment by Judah Schvimer [ 24/Jul/19 ]

It feels weird to allow reads but not writes. I agree that reads are not problematic for prepared transactions. alyson.cabral, do you think we should do this ticket if it's not a problem from the technical side?

Comment by Eric Milkie [ 24/Jul/19 ]

Is this actually necessary to do? Writes to capped collections in multi-doc transactions have some complications, but I don't see a problem with reads.

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