PHOENIX-5544: Dropping a base table with cascade with an older client does not clear all child view metadata #620
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Please review @twdsilva @lhofhansl
This PR makes the following changes:
Added
ViewUtil#getSystemTableForChildLinks
which provides us whether we should use SYSCAT or SYS.CHILD_LINK to process parent->child links.First connection is from a 4.14 client:
First connection is from a 4.15 client (so we have upgraded the metadata) and a subsequent connection is made from a 4.14 client:
ChildLinkMetaDataEndpoint
(PHOENIX-4810) is not present. In this case, we continue sending server-server RPC from the SYSCAT region to the SYSTEM.CHILD_LINK region and store parent->child links in the CHILD_LINK table rather than SYSCAT.DropChildViewsTask
just like any 4.15 client would.DropChildViewsTask
is completed, we explicitly drop the child views for that table.No change for connections from 4.15 clients throughout.
Tested the repro I mentioned in the JIRA with a 4.15 server (tested with NS-mapping enabled and disabled):