Uh oh!
There was an error while loading. Please reload this page.
[SPARK-23524] Big local shuffle blocks should not be checked for corruption. - #20685
[SPARK-23524] Big local shuffle blocks should not be checked for corruption.#20685jinxing64 wants to merge 3 commits into
Conversation
jinxing64
commented
Feb 27, 2018
Jenkins, test this please |
SparkQA
commented
Feb 27, 2018
Test build #87714 has finished for PR 20685 at commit
|
SparkQA
commented
Feb 28, 2018
Test build #87741 has finished for PR 20685 at commit
|
jinxing64
commented
Feb 28, 2018
Jenkins, retest this please |
SparkQA
commented
Feb 28, 2018
Test build #87755 has finished for PR 20685 at commit
|
jinxing64
commented
Feb 28, 2018
Jenkins, retest this please. |
SparkQA
commented
Feb 28, 2018
Test build #87770 has finished for PR 20685 at commit
|
The failed test |
jinxing64
commented
Mar 1, 2018
Jenkins, retest this please. |
SparkQA
commented
Mar 1, 2018
Test build #87807 has finished for PR 20685 at commit
|
cc @cloud-fan@zsxwing@squito@jiangxb1987 |
squito
left a comment
There was a problem hiding this comment.
minor cleanup in the test, otherwise lgtm. thanks for catching this and suggesting a fix.
| intercept[FetchFailedException] { iterator.next() } | ||
| } | ||
| test("big corrupt blocks will not be retiried") { |
There was a problem hiding this comment.
typo: retried (or maybe "retired", not sure)
though I think a better name would be "big blocks are not checked for corruption"
| ) | ||
| val transfer = mock(classOf[BlockTransferService]) | ||
| when(transfer.fetchBlocks(any(), any(), any(), any(), any(), any())) |
There was a problem hiding this comment.
you can reuse createMockTransfer to simplify this a little.
(actually, a bunch of this test code looks like it could be refactored across these tests -- but we can leave that out of this change.)
There was a problem hiding this comment.
Thanks a lot~ Imran, I can file another pr for the refine :)
There was a problem hiding this comment.
sorry my comment was vague -- I do think you can use createMockTransfer here, since that helper method already exists.
I was just thinking that there may be more we could clean up -- setting up the local & remote BlockManager Id, creating the ShuffleIterator, etc. seems to have a lot of boilerplate in all the tests. But let's not to do a pure refactoring to the other tests in this change.
cloud-fan
commented
Mar 5, 2018
We should update the doc of |
jinxing64
commented
Mar 6, 2018
@squito@cloud-fan |
SparkQA
commented
Mar 6, 2018
Test build #88003 has finished for PR 20685 at commit
|
cloud-fan
commented
Mar 6, 2018
squito
commented
Mar 7, 2018
it'll also help with disk corruption ... from the stack traces in SPARK-4105 you can't really tell what the source of the problem is. it'll be pretty hard to determine what the source of corruption is if we start seeing it again. anyway, I don't feel that strongly about it either way. |
| * @param size estimated size of the block, used to calculate bytesInFlight. | ||
| * Note that this is NOT the exact bytes. | ||
| * @param size estimated size of the block. Note that this is NOT the exact bytes. | ||
| * Size of remote block is used to calculate bytesInFlight. |
cloud-fan
commented
Mar 7, 2018
sounds reasonable. The purpose of this corruption check is to fail fast to retry the stage(re-shuffle), so disk corruption should also be counted. |
cloud-fan
commented
Mar 7, 2018
LGTM |
@cloud-fan@squito@Ngone51 |
SparkQA
commented
Mar 7, 2018
Test build #88033 has finished for PR 20685 at commit
|
zsxwing
commented
Mar 7, 2018
I think #20179 probably already fixed the data corruption issue. |
cloud-fan
commented
Mar 7, 2018
yea very likely, but I'm not 100% sure. How about we merge this one first to fix the mistake for local shuffle blocks, and then think about whether or not we should remove this corruption check? |
squito
commented
Mar 8, 2018
I agree with @cloud-fan . |
squito
commented
Mar 8, 2018
lgtm |
cloud-fan
commented
Mar 8, 2018
thanks, merging to master/2.3! |
…uption. ## What changes were proposed in this pull request? In current code, all local blocks will be checked for corruption no matter it's big or not. The reasons are as below: Size in FetchResult for local block is set to be 0 (https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/storage/ShuffleBlockFetcherIterator.scala#L327) SPARK-4105 meant to only check the small blocks(size<maxBytesInFlight/3), but for reason 1, below check will be invalid. https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/storage/ShuffleBlockFetcherIterator.scala#L420 We can fix this and avoid the OOM. ## How was this patch tested? UT added Author: jx158167 <jx158167@antfin.com> Closes#20685 from jinxing64/SPARK-23524. (cherry picked from commit 77c91cc) Signed-off-by: Wenchen Fan <wenchen@databricks.com>
jinxing64
commented
Mar 8, 2018
Thanks for merging ! |
…uption. ## What changes were proposed in this pull request? In current code, all local blocks will be checked for corruption no matter it's big or not. The reasons are as below: Size in FetchResult for local block is set to be 0 (https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/storage/ShuffleBlockFetcherIterator.scala#L327) SPARK-4105 meant to only check the small blocks(size<maxBytesInFlight/3), but for reason 1, below check will be invalid. https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/storage/ShuffleBlockFetcherIterator.scala#L420 We can fix this and avoid the OOM. ## How was this patch tested? UT added Author: jx158167 <jx158167@antfin.com> Closesapache#20685 from jinxing64/SPARK-23524. (cherry picked from commit 77c91cc) Signed-off-by: Wenchen Fan <wenchen@databricks.com>
What changes were proposed in this pull request?
In current code, all local blocks will be checked for corruption no matter it's big or not. The reasons are as below:
Size in FetchResult for local block is set to be 0 (https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/storage/ShuffleBlockFetcherIterator.scala#L327)
SPARK-4105 meant to only check the small blocks(size<maxBytesInFlight/3), but for reason 1, below check will be invalid. https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/storage/ShuffleBlockFetcherIterator.scala#L420
We can fix this and avoid the OOM.
How was this patch tested?
UT added