[SPARK-30470][SQL]Uncache cached temp tables on session closed#27149
Closed
liupc wants to merge 2 commits intoapache:masterfrom
Closed
[SPARK-30470][SQL]Uncache cached temp tables on session closed#27149liupc wants to merge 2 commits intoapache:masterfrom
liupc wants to merge 2 commits intoapache:masterfrom
Conversation
|
Can one of the admins verify this patch? |
Member
|
Why did you add a public interface for that? I think this issue should be handled implicitly for users. |
Author
|
Thanks for reply @maropu , Yes, this should be handled implicitly for users, I'll make it handled implictly for users. |
dongjoon-hyun
requested changes
Jan 12, 2020
Member
There was a problem hiding this comment.
Hi, @liupc . Could you provide a reproducible procedure on master branch? Or at least, Apache Spark 3.0.0-preview2?
Also, cc @LantaoJin because this might be a duplication of #26543 .
Member
|
Gentle ping, @liupc . |
Author
|
@dongjoon-hyun Thanks, I think this is a duplication of of #26543, I'll close it. |
Member
|
I've closed the corresponding JIRA, too. |
Member
This file contains hidden or 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
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.
What changes were proposed in this pull request?
Currently, Spark will not cleanup cached tables in tempViews produced by sql like following
CACHE TABLE table1 as SELECT ....There are risks that the
uncache tablenot called due to session closed unexpectedly, or user closed manually. Then these temp views will lost, and we can not visit them in other session, but the cached plan still exists in theCacheManager.Moreover, the leaks may cause the failure of the subsequent query.
This PR will fix it.
Why are the changes needed?
This PR will fix the above issues by uncache cached temp tables when closing session.
Does this PR introduce any user-facing change?
No
How was this patch tested?
UT