Spark 3.5: Add max allowed failed commits to RewriteDataFiles when partial progress is enabled#9611
Conversation
|
@amogh-jahagirdar This is based on our discussion in #9400, but I'd like to go one step further. Throwing exception and fail can work with alert system easier than logging an error. WDYT? |
| } else if (failedCommits > maxFailedCommits) { | ||
| String errorMessage = | ||
| String.format( | ||
| "%s is true but %d rewrite commits failed. This is more than the maximum allowed failures of %d. " |
There was a problem hiding this comment.
I should mention this message is generated by GitHub copilot.
4827464 to
8faaa67
Compare
8faaa67 to
cbd5198
Compare
cbd5198 to
0e09e09
Compare
|
Sorry for the delay. I didn't forget. |
0e09e09 to
8069af1
Compare
| String.format( | ||
| "%s is true but %d rewrite commits failed. This is more than the maximum allowed failures of %d. " | ||
| + "Check the logs to determine why the individual commits failed. If this is persistent it may help to " | ||
| + "increase %s which will break the rewrite operation into smaller commits.", |
There was a problem hiding this comment.
nit: instead of break maybe use split?
| table.refresh(); | ||
|
|
||
| List<Object[]> postRewriteData = currentData(); | ||
| assertEquals("We shouldn't have changed the data", originalData, postRewriteData); |
There was a problem hiding this comment.
| assertEquals("We shouldn't have changed the data", originalData, postRewriteData); | |
| assertThat(postRewriteData).isEqualTo(originalData); |
nastra
left a comment
There was a problem hiding this comment.
LGTM with some nits that would be good to address
8069af1 to
d13f167
Compare
|
Looks like there are some related test failures: |
|
I think we should continue to use |
…rtial progress is enabled
d13f167 to
0c42809
Compare
|
Thanks, @manuzhang! Thanks for reviewing, @nastra @RussellSpitzer! |
…mits this backports apache#9449 and apache#9611 to Spark 3.4
…mits this backports apache#9449 and apache#9611 to Spark 3.4
…mits this backports apache#9449 and apache#9611 to Spark 3.4
When partial progress is enabled,
rewrite_data_filesSpark app can succeed without any "progress" (commits). This PR adds an optionpartial-progress.max-failed-commitsand a RuntimeException will be thrown if the number of failed commits exceed it. The default value ispartital-progress.max-commitsto be consistent with current behavior.