[SERVER-57061] Concurrent writers can create a Collection and a View on the same namespace Created: 19/May/21 Updated: 29/Oct/23 Resolved: 28/May/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | 4.4.0 |
| Fix Version/s: | 5.0.0-rc1, 5.1.0-rc0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Henrik Edin | Assignee: | Henrik Edin |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | post-rc0, read-only-views | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||
| Backport Requested: |
v5.0, v4.4
|
||||||||||||||||||||
| Sprint: | Execution Team 2021-05-31, Execution Team 2021-06-14 | ||||||||||||||||||||
| Participants: | |||||||||||||||||||||
| Linked BF Score: | 143 | ||||||||||||||||||||
| Description |
|
The createCollection and createView cross checks the systems at a high level after acquiring the Collection MODE_IX lock.
However, writes to the CollectionCatalog and ViewCatalog are serialized individually making it possible that both a Collection and View to be added. |
| 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/Jun/21 ] |
|
Author: {'name': 'Henrik Edin', 'email': 'henrik.edin@mongodb.com', 'username': 'henrikedin'}Message: The CollectionCatalog can now ensure a namespace is not concurrently registered for a Collection and View. (cherry picked from commit af3e6c163fd3cc80ee1c7433943135e943432598) |
| Comment by Githook User [ 28/May/21 ] |
|
Author: {'name': 'Henrik Edin', 'email': 'henrik.edin@mongodb.com', 'username': 'henrikedin'}Message: The CollectionCatalog can now ensure a namespace is not concurrently registered for a Collection and View. |
| Comment by Daniel Gottlieb (Inactive) [ 20/May/21 ] |
|
Marking that this likely affects 4.4 and likewise requested a backport. Will let storage execution deem if it's worth backporting. |
| Comment by Daniel Gottlieb (Inactive) [ 20/May/21 ] |
|
Does this date back to the project for collection creation to take IX locks? Can't recall if that was 4.2 or 4.4. |
| Comment by Geert Bosch [ 19/May/21 ] |
|
Could this be fixed by view creation taking a MODE_X lock? |