- 
                Notifications
    
You must be signed in to change notification settings  - Fork 28.9k
 
[SPARK-20716][SS] StateStore.abort() should not throw exceptions #17958
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
| 
           Test build #76845 has finished for PR 17958 at commit  
  | 
    
| 
           Test build #76844 has finished for PR 17958 at commit  
  | 
    
| 
           Test build #3711 has finished for PR 17958 at commit  
  | 
    
| if (tempDeltaFile != null) { | ||
| fs.delete(tempDeltaFile, true) | ||
| case e: Exception => | ||
| logWarning(s"Error aborting version $newVersion into $this") | 
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.
Include the exception.
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.
Dumb mistake.
| fs.delete(tempDeltaFile, true) | ||
| } | ||
| } catch { | ||
| case c: ClosedChannelException => | 
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.
Why need two cases? The error message is same, and the exception is also in the log.
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.
Its debug though for the expected case.
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.
Maybe it should be a warning? In this case, the task will fail and it hurts nothing to output a warning but will be helpful when we have other issues.
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.
Gotcha!
| 
           Test build #76880 has finished for PR 17958 at commit  
  | 
    
| 
           LGTM. Merging to master and 2.2. Thanks!  | 
    
## What changes were proposed in this pull request? StateStore.abort() should do a best effort attempt to clean up temporary resources. It should not throw errors, especially because its called in a TaskCompletionListener, because this error could hide previous real errors in the task. ## How was this patch tested? No unit test. Author: Tathagata Das <tathagata.das1565@gmail.com> Closes #17958 from tdas/SPARK-20716. (cherry picked from commit 271175e) Signed-off-by: Shixiong Zhu <shixiong@databricks.com>
## What changes were proposed in this pull request? StateStore.abort() should do a best effort attempt to clean up temporary resources. It should not throw errors, especially because its called in a TaskCompletionListener, because this error could hide previous real errors in the task. ## How was this patch tested? No unit test. Author: Tathagata Das <tathagata.das1565@gmail.com> Closes apache#17958 from tdas/SPARK-20716.
## What changes were proposed in this pull request? StateStore.abort() should do a best effort attempt to clean up temporary resources. It should not throw errors, especially because its called in a TaskCompletionListener, because this error could hide previous real errors in the task. ## How was this patch tested? No unit test. Author: Tathagata Das <tathagata.das1565@gmail.com> Closes apache#17958 from tdas/SPARK-20716.
## What changes were proposed in this pull request? StateStore.abort() should do a best effort attempt to clean up temporary resources. It should not throw errors, especially because its called in a TaskCompletionListener, because this error could hide previous real errors in the task. ## How was this patch tested? No unit test. Author: Tathagata Das <tathagata.das1565@gmail.com> Closes apache#17958 from tdas/SPARK-20716. (cherry picked from commit 271175e) Signed-off-by: Shixiong Zhu <shixiong@databricks.com> (cherry picked from commit 82ae1f0)
What changes were proposed in this pull request?
StateStore.abort() should do a best effort attempt to clean up temporary resources. It should not throw errors, especially because its called in a TaskCompletionListener, because this error could hide previous real errors in the task.
How was this patch tested?
No unit test.