srowen commented on a change in pull request #23638: [SPARK-26713][CORE]
Interrupt pipe IO threads in PipedRDD when task is finished
URL: https://github.com/apache/spark/pull/23638#discussion_r251520652
##########
File path:
core/src/main/scala/org/apache/spark/storage/ShuffleBlockFetcherIterator.scala
##########
@@ -395,7 +402,7 @@ final class ShuffleBlockFetcherIterator(
// then fetch it one more time if it's corrupt, throw FailureFetchResult
if the second fetch
// is also corrupt, so the previous stage could be retried.
// For local shuffle block, throw FailureFetchResult for the first
IOException.
- while (result == null) {
+ while (!isZombie && result == null) {
Review comment:
Yeah that can happen. Right now I think it's 'worse' in that the iterator
might be cleaned up and yet next() will keep querying the iterator that's being
drained by cleanup().
To really tighten it up I think more or all of `next()` and `cleanup()`
would have to be synchronized (?) and I'm not sure what the implications are of
that.
We could follow this up with small things like making `hasNext()`
synchronized at least, as `isZombie` is marked `GuardedBy("this")`. That still
doesn't prevent this from happening but is a little tighter.
@advancedxy what do you think? I think the argument is merely that this
fixes the potential issue in 99% of cases, not 100%.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]