srowen commented on a change in pull request #32534:
URL: https://github.com/apache/spark/pull/32534#discussion_r634394234
##########
File path: core/src/main/scala/org/apache/spark/storage/memory/MemoryStore.scala
##########
@@ -387,7 +392,24 @@ private[spark] class MemoryStore(
def remove(blockId: BlockId): Boolean = memoryManager.synchronized {
val entry = entries.synchronized {
- entries.remove(blockId)
+ val removed = entries.remove(blockId)
+ val entryManualCloseTasks = Future {
+ removed match {
+ case e: DeserializedMemoryEntry[_] => e.value.foreach {
+ case o: AutoCloseable =>
+ try {
+ o.close
+ } catch {
+ case NonFatal(e) =>
+ logWarning(s"Got NonFatal exception during closing blockId
${blockId}")
+ }
+ case _ =>
+ }
+ case _ =>
+ }
+ }
+ ThreadUtils.awaitResult(entryManualCloseTasks, Duration.Inf)
Review comment:
Do you need to await the results? it's best effort.
--
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]