[DOCS-12990] Investigate changes in SERVER-41947: Disallow using the "system.views" collection name as the source or target names in the rename command Created: 28/Aug/19  Updated: 13/Nov/23  Resolved: 17/Oct/19

Status: Closed
Project: Documentation
Component/s: manual
Affects Version/s: None
Fix Version/s: 4.3.1, 4.2.1, Server_Docs_20231030, Server_Docs_20231106, Server_Docs_20231105, Server_Docs_20231113

Type: Task Priority: Major - P3
Reporter: Backlog - Core Eng Program Management Team Assignee: Unassigned
Resolution: Gone away Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Documented
documents SERVER-41947 Disallow using the "system.views" col... Closed
Participants:
Days since reply: 4 years, 16 weeks, 6 days ago
Epic Link: DOCS: 4.4 Server Release Work

 Description   

Description

Downstream Change Summary

renaming "system.views" or renaming any collection to "system.views" via command is not allowed.

Description of Linked Ticket

This is a bug fix for a build failure where the following scenario leads to a deadlock:

T1: Rename command is renaming 'test.coll' to 'test.system.views', so it has the MODE_IX on 'test' and MODE_X on both 'coll' and 'system.views'. The next step is to check if 'coll' is a view by calling the ViewCatalog::lookup() and waiting to acquire the ViewCatalog mutex which is currently held by T2.

T2: Running CountCmd on a collection that didn't exist, but in AutoGetCollection we check if it could be a view and call ViewCatalog::lookup(), here we see that the ViewCatalog is invalidated, so we call _reloadIfNeeded. Now _reloadIfNeeded() uses the DurableViewCatalog::iterate but that requires the MODE_IS lock on the 'test.system.views' collection which is currently held by T1.

So we have a deadlock where:
T1 has MODE_X on 'test.system.views' but is waiting for ViewCatalog mutex.
T2 has ViewCatalog mutex during reload and needs MODE_IS on 'test.system.views'.

Scope of changes

Impact to Other Docs

MVP (Work and Date)

Resources (Scope or Design Docs, Invision, etc.)



 Comments   
Comment by Kay Kim (Inactive) [ 17/Oct/19 ]

This actually doesn't need docs.

Generated at Thu Feb 08 08:06:40 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.