-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-47833][SQL][CORE] Supply caller stackstrace for checkAndGlobPathIfNecessary AnalysisException #46028
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
…thIfNecessary AnalysisException
|
cc @gengliangwang @LuciferYang @mridulm WDYT of this approach for stacktrace enhancement? Or do you have other suggestions? |
mridulm
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.
Looks reasonable to me, but I will let @viirya and @dongjoon-hyun comment better.
Btw, are there other callsites where this might be helpful ?
|
@mridulm In this case, |
|
|
||
| ThreadUtils.wrapCallerStacktrace(exception, s"run in separate thread: $runnerThreadName") | ||
|
|
||
| assert(exception.getStackTrace.mkString("\n").contains( |
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.
nit: val stStr = exception.getStackTrace.mkString("\n")
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.
changed as suggested
| "org.scalatest.Suite.run"), | ||
| "stack trace does not contain caller stack trace" | ||
| ) | ||
| assert(exception.getStackTrace.mkString("\n").contains("ThreadUtils.scala") === false, |
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.
nit: !exception.getStackTrace.mkString("\n").contains("ThreadUtils.scala")
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.
changed as suggested
| ) | ||
| } | ||
|
|
||
| test("wrapCallerStacktrace") { |
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.
attach jira id
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.
added
|
@yaooqinn thanks for reviewing, I addressed all comments |
yaooqinn
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, thank you for updating the desc
|
Merged to master. Thank you @pan3793 |
What changes were proposed in this pull request?
SPARK-29089 parallelized
checkAndGlobPathIfNecessaryby leveraging ForkJoinPool, it also introduced a side effect, if something goes wrong, the reported error message loses caller side stack trace.For example, I meet the following error in a Spark job, I have no idea what happened without the caller stack trace.
Why are the changes needed?
Improve error message.
Does this PR introduce any user-facing change?
No.
How was this patch tested?
New UT is added, and the exception stacktrace differences are
raw stacktrace
enhanced exception stacktrace
Was this patch authored or co-authored using generative AI tooling?
No