-
Notifications
You must be signed in to change notification settings - Fork 606
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
YQ-3684 fix screts not found error handling #9822
Closed
GrigoriyPA
wants to merge
306
commits into
ydb-platform:main
from
GrigoriyPA:merge-to-ydb-stable-YQ-3684-fix-screts-not-found-error
Closed
YQ-3684 fix screts not found error handling #9822
GrigoriyPA
wants to merge
306
commits into
ydb-platform:main
from
GrigoriyPA:merge-to-ydb-stable-YQ-3684-fix-screts-not-found-error
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…latform#1960) (ydb-platform#2479) KIKIMR-21002 In this PR we add the following algorithm for invalidating cache entries for outdated VIEWs: 1. Store path ids and schema versions of the views that were used in the query in the cache entries, so they can be accessed later. 2. Whenever we retrieve a compilation result from cache, send a request for SchemeCache to check if the schema version of the views used in this query (if any) has not changed since we compiled this query. 3. Send a recompilation request if any view is outdated. There are two important things to note about this solution: - We make a SchemeCache request for each repeated query and there is a lot of these in an OLTP-focused database like YDB. However, we have already been sending these request for preliminary (this is not the last check of schema version mismatch (at least for tables)) cache invalidation for tables, so views should not incur an additional performance impact here. - This solution does not guarantee strong consistency for queries using views, because query cache invalidation will not happen instantly after the view definition is updated. The node should get an update from the SchemeCache, which takes some time.
…db-platform#2629) Co-authored-by: Andrey Neporada <aneporada@ydb.tech>
…ment (ydb-platform#2049) (ydb-platform#2595) Based on: ydb-platform#2049 KIKIMR-20891 CREATE VIEW statement parses (and validates) the select statement saved in the view. It should be parsed in a context isolated from the statements executed before the CREATE VIEW statement (we haven't decided yet on the exact scope of the context of the view's select statement, see [KIKIMR-20656](https://st.yandex-team.ru/KIKIMR-20656)). It is pretty obvious that one should be able to execute the following statement in one go ("one go" = one press of a "run" button in YDB UI): ```sql -- create view NecessaryInnerView with (security_invoker = true) as select 1; -- create view ContextTestingView with (security_invoker = true) as select * from `/local/NecessaryInnerView`; -- where `/local/...` is your cluster name drop view ContextTestingView; create view ContextTestingView with (security_invoker = true) as select * from `/local/NecessaryInnerView`; ``` However, executing both drop view and create view in one go currently produces and error: ``` DropObject is not yet implemented for intent determination transformer ``` which indicates that the context of the inner query: ```sql select * from `/local/NecessaryInnerView` ``` is polluted by the previous: ```sql drop view ContextTestingView; ``` statement. This problem is fixed by using an empty parsing context for parsing view's inner select statement during handling of CREATE VIEW statement.
Co-authored-by: Daniil Cherednik <dcherednik@ydb.tech> Co-authored-by: spuchin <spuchin@ydb.tech>
🔴 Unable to merge your PR into the base branch. Please rebase or merge it with the base branch. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
DATABASE_NAME
field #5984 YDB FQ: Support MDB MySQL in DatabaseResolver #6257 YDB FQ: Add MySQL to fq proxy #6298 YDB FQ: fix external datasource tests #6471 YDB FQ: Refactor MySQL parser #6484 YDB FQ: distinguish dedicated and serverless YDBs viastorageConfig
section #6703 (Merge #5932 #5984 #6257 #6298 #6471 #6484 #6703 #6721)Changelog entry
...
Changelog category
Additional information
...