[SERVER-63660] Unit test view catalog behavior erroring on commit if there was a concurrent collection/view creation on the same namespace Created: 15/Feb/22  Updated: 05/Jun/23  Resolved: 05/Jun/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Dianna Hohensee (Inactive) Assignee: Backlog - Storage Execution Team
Resolution: Won't Do Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-57250 CollectionCatalog should handle and o... Closed
Assigned Teams:
Storage Execution
Participants:

 Description   

SERVER-57250 is adding a check on view creation that collection creation on the same namespace doesn't race on commit, throwing an error if there's a conflict. We need to unit test that everything behaves correctly – SERVER-57250 is deferring testing to this ticket.



 Comments   
Comment by Connie Chen [ 05/Jun/23 ]

Closing this as "won't do" as we currently are comfortable with the level of test coverage we have. If we discover a bug, we should revisit creating this unit test. 

Comment by Dianna Hohensee (Inactive) [ 15/Feb/22 ]

Henrik dug up code confirming that the UncommittedCollection code path does already check for view namespace conflicts.

"This code runs in a preCommitHandler under CollectionCatalog::write so it is serialized. If there is a view on the namespace we fail the collection creation. It uses uassert instead of WCE as we can't retry the collection creation, the view is still there."

So I'll update this ticket to just add unit testing for the new view code behavior, and check that the collection behavior is exercised in unit-testing, too.

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