Ngone51 commented on a change in pull request #32287:
URL: https://github.com/apache/spark/pull/32287#discussion_r622702766
##########
File path:
core/src/main/scala/org/apache/spark/storage/ShuffleBlockFetcherIterator.scala
##########
@@ -799,9 +872,17 @@ private class BufferReleasingInputStream(
override def close(): Unit = {
if (!closed) {
- delegate.close()
- iterator.releaseCurrentResultBuffer()
- closed = true
+ try {
+ delegate.close()
+ iterator.releaseCurrentResultBuffer()
+ } finally {
+ // Unset the flag when a remote request finished and free memory is
fairly enough.
+ if (ShuffleBlockFetcherIterator.isNettyOOMOnShuffle.get &&
+ isNetworkReqDone && NettyUtils.freeDirectMemory() >
iterator.averageRemoteBlockSize) {
Review comment:
it should be 4 indents for the if condition.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]