-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-32165][SQL] Ensure Spark only initiates SharedState once across SparkSessions #31053
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
Conversation
|
@cloud-fan @vinooganesh @advancedxy Please take a look, thanks! |
|
Kubernetes integration test starting |
|
Kubernetes integration test status failure |
|
Test build #133713 has finished for PR 31053 at commit
|
|
seems we can also fix this issue by making sure there is only one |
right |
sql/core/src/main/scala/org/apache/spark/sql/SparkSession.scala
Outdated
Show resolved
Hide resolved
sql/core/src/main/scala/org/apache/spark/sql/internal/SharedState.scala
Outdated
Show resolved
Hide resolved
Seems like the If we want to make sure there's only one Besides, although the only one SharedState instance can fixe Thoughts? |
|
I think it's an accident that the |
|
I agree with @cloud-fan and think it's easier just to ensure that SharedState can only be created once. Trying to compare listeners with their fully qualified class name seems more problematic than necessary (especially when there are so many different workflows that people use when setting up their listeners - including ones where different instances of a listener with the same fully qualified class name exist) |
|
Hey guys, I've updated the PR with the one SharedState way. Please take another look, thanks! |
|
Kubernetes integration test starting |
|
Kubernetes integration test status failure |
sql/core/src/main/scala/org/apache/spark/sql/internal/SharedState.scala
Outdated
Show resolved
Hide resolved
sql/core/src/main/scala/org/apache/spark/sql/internal/SharedState.scala
Outdated
Show resolved
Hide resolved
|
Kubernetes integration test starting |
|
Kubernetes integration test status success |
sql/core/src/main/scala/org/apache/spark/sql/internal/SharedState.scala
Outdated
Show resolved
Hide resolved
|
Test build #134013 has finished for PR 31053 at commit
|
|
Test build #134007 has finished for PR 31053 at commit
|
|
Kubernetes integration test starting |
|
Kubernetes integration test status success |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it duplicated with checking assert(countListener("ExecutionListenerBus", context) === 2)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. Here we want to ensure other potential listeners won't leak across SparkSessions.
sql/core/src/main/scala/org/apache/spark/sql/internal/SharedState.scala
Outdated
Show resolved
Hide resolved
jaceklaskowski
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM (non-binding)
|
Kubernetes integration test starting |
|
Test build #134035 has finished for PR 31053 at commit
|
|
Test build #134134 has finished for PR 31053 at commit
|
|
Kubernetes integration test starting |
|
Kubernetes integration test status failure |
|
retest this please |
|
Kubernetes integration test starting |
|
Test build #134210 has finished for PR 31053 at commit
|
|
Kubernetes integration test status failure |
|
retest this please |
|
Kubernetes integration test starting |
|
Test build #134247 has finished for PR 31053 at commit
|
|
retest this please |
|
Kubernetes integration test status failure |
|
Kubernetes integration test starting |
|
Kubernetes integration test status success |
|
Test build #134253 has finished for PR 31053 at commit
|
|
retest this please |
|
Kubernetes integration test starting |
|
Kubernetes integration test status success |
|
Test build #134275 has finished for PR 31053 at commit
|
|
We're closing this PR because it hasn't been updated in a while. This isn't a judgement on the merit of the PR in any way. It's just a way of keeping the PR queue manageable. |
|
@Ngone51 @cloud-fan Hi! The issue still exists. Can we reopen this PR? Otherwise please provide any comments why this cannot be merged or what should be done first? |
What changes were proposed in this pull request?
This PR makes sure that
SharedStatewould be only initiated once across SparkSessions.Why are the changes needed?
This helps us to fix the listener(e.g., SQLAppStatusListener) leak issue, and allow SparkSessions created by
getOrCreateto share theCacheManager, global temp view, etc.Does this PR introduce any user-facing change?
No.
How was this patch tested?
Added UTs.