[SERVER-40684] Ban transactions against capped collections on non-shard-servers Created: 16/Apr/19 Updated: 29/Oct/23 Resolved: 13/May/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Replication |
| Affects Version/s: | None |
| Fix Version/s: | 4.1.12 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Dianna Hohensee (Inactive) | Assignee: | Vesselina Ratcheva (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | prepare_errors | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||||||
| Backport Requested: |
v4.0
|
||||||||||||||||||||||||||||
| Sprint: | Repl 2019-05-20 | ||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||
| Description |
|
Suggesting testing insert/update/insert such that it exceeds the capped limit, both in a successful operation and as part of a txn that rolls back. |
| Comments |
| Comment by Githook User [ 13/May/19 ] |
|
Author: {'name': 'Vesselina Ratcheva', 'username': 'vessy-mongodb', 'email': 'vesselina.ratcheva@10gen.com'}Message: |
| Comment by Judah Schvimer [ 03/May/19 ] |
|
After discussing with alyson.cabral, it seems easiest and safest to ban capped collections entirely in transactions on 4.2 (shard servers or not). We will decide whether to improve testing on 4.0 of capped collections in transactions or backport the ban after 4.2 is out the door. |
| Comment by Dianna Hohensee (Inactive) [ 22/Apr/19 ] |
|
I would guess that it takes S for reads and X for writes, but I don't know where the code is without looking. |
| Comment by Dianna Hohensee (Inactive) [ 22/Apr/19 ] |
|
I just banned capped collections from transactions on shard servers. So we already decided that capped collections can only be in non-shard replica set transactions. I think all this ticket needs is testing. Geert was uncomfortable with the lack of testing after I altered some incidental testing that didn't really have enough coverage anyway. |
| Comment by Siyuan Zhou [ 22/Apr/19 ] |
|
Cool! Out of curiosity, which strong locks are you referring to? I'm fine with either supporting it or banning it. alyson.cabral doesn't think this is an important change to users, so I guess we should do whichever is easier. It seems testing is easier to me. |
| Comment by Dianna Hohensee (Inactive) [ 22/Apr/19 ] |
|
I believe the story is that it's safe because we serialize access to capped collections – strong locks are taken --, so we cannot conflict with anything once the lock is acquired. |
| Comment by Siyuan Zhou [ 22/Apr/19 ] |
|
dianna.hohensee, if the document modified by a running transaction is about to be removed by the capped collection, does that cause infinite write conflict for the removal until the transaction finishes? judah.schvimer pointed out that 4.0 currently supports transactions on capped collections. I'm wondering about the expected behavior and whether we need to ban capped collections in general both in 4.2 and 4.0. |