Details
-
Sub-task
-
Status: Open
-
Major
-
Resolution: Unresolved
-
5.0.0, 4.15.0
-
None
-
None
Description
When we issue a DROP TABLE/VIEW, if the table/view being dropped has child views (and CASCADE is provided), we add a DropChildViewsTask in the SYSTEM.TASK table (see this). This means that while holding the row lock for the table/view’s header row (here) we do the following:
- Make an RPC to the region hosting SYSTEM.CHILD_LINK to scan it in order to find child views.
- If any child views are found in the step above, we make additional RPCs to the region hosting SYSTEM.TASK to UPSERT a DropChildViewsTask for immediate child views.
- We send remote mutations to drop parent→child links from the SYSTEM.CHILD_LINK table.
Of the above extra RPCs, note that even if the table/view has no child views or if CASCADE is not provided, we will still do the first RPC from the server while holding a row lock.
We should move this check to the client (issue a scan against SYSTEM.CHILD_LINK to see if a single linking row exists) and also add the task from the client.
Attachments
Issue Links
- depends upon
-
PHOENIX-6155 Prevent doing direct upserts into SYSTEM.TASK from the client
- Resolved