From 6cc5438441e0443bc7794af8fdab1edc6edfc7e0 Mon Sep 17 00:00:00 2001 From: Liang-Chi Hsieh Date: Sun, 11 Aug 2024 16:43:07 -0700 Subject: [PATCH] Revert "Add synchronized" This reverts commit aac200a210ce13470c883acb7ed1d367270d5620. --- .../sql/comet/execution/shuffle/ArrowReaderIterator.scala | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/common/src/main/scala/org/apache/spark/sql/comet/execution/shuffle/ArrowReaderIterator.scala b/common/src/main/scala/org/apache/spark/sql/comet/execution/shuffle/ArrowReaderIterator.scala index b06892e4c8..3c0fa153d8 100644 --- a/common/src/main/scala/org/apache/spark/sql/comet/execution/shuffle/ArrowReaderIterator.scala +++ b/common/src/main/scala/org/apache/spark/sql/comet/execution/shuffle/ArrowReaderIterator.scala @@ -40,10 +40,8 @@ class ArrowReaderIterator(channel: ReadableByteChannel, source: String) // Release the previous batch. // If it is not released, when closing the reader, arrow library will complain about // memory leak. - synchronized { - if (currentBatch != null) { - currentBatch.close() - } + if (currentBatch != null) { + currentBatch.close() } batch = nextBatch()