[SERVER-68556] Allow transactions on system.buckets collections Created: 04/Aug/22 Updated: 29/Oct/23 Resolved: 31/Aug/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 6.2.0-rc0, 6.0.9 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Michael Gargiulo | Assignee: | Matthew Saltz (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Backport Requested: |
v6.1, v6.0
|
||||||||
| Sprint: | Execution Team 2022-09-05 | ||||||||
| Participants: | |||||||||
| Description |
|
Currently we prohibit operations inside of a multi-document transaction from being performed on all system collections. In order for time-series collections to integrate with the C2C replicator, the ability to perform operations within multi-doc transactions on the system.buckets collection is needed. |
| Comments |
| Comment by Githook User [ 12/Jul/23 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Author: {'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}Message: (cherry picked from commit 135eefc1bd00a5ab5c97ba679805dc150c9429ec) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Githook User [ 30/Aug/22 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Author: {'name': 'Matthew Saltz', 'email': 'matthew.saltz@mongodb.com', 'username': 'saltzm'}Message: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Matthew Saltz (Inactive) [ 09/Aug/22 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Okay, so I modified my test to actually run in a transaction (I had to use session.getDatabase("test").getCollection(...)) to get the buckets collection), and it turned out that it still passes when I run an insert. However, when I run findAndModify (for example), it fails with
This is because we explicitly allowed inserts to timeseries buckets collections as part of So we'll probably still have to do some work for this ticket, and maybe should unify those transaction checks somehow. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Matthew Saltz (Inactive) [ 09/Aug/22 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Ah - I think my test is wrong and may not actually be running a transaction at the moment... Stay tuned | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Matthew Saltz (Inactive) [ 09/Aug/22 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I wrote a test to run a transaction on a system.buckets.<collection> collection to see if it failed, but it actually succeeded. (See the bottom of this comment for the full test). I'm wondering if the idea that we don't support running transactions on "system collections" comes from the fact that we used to ban transactions on the config database. (These conditions are now more relaxed after Unless someone else knows of a different prevention mechanism in place for collections with the prefix system. or can point out an issue in my test below (which is very possible), I think we can either close this ticket or try to commit a test proving that it works.
|