viirya commented on a change in pull request #32743:
URL: https://github.com/apache/spark/pull/32743#discussion_r644160779



##########
File path: core/src/main/scala/org/apache/spark/storage/memory/MemoryStore.scala
##########
@@ -390,39 +387,28 @@ private[spark] class MemoryStore(
     }
   }
 
-  def manualClose[T <: MemoryEntry[_]](entry: T): T = {
-    val entryManualCloseTasks = Future {
-      entry match {
-        case e: DeserializedMemoryEntry[_] => e.value.foreach {
-          case o: AutoCloseable =>
-            try {
-              o.close
-            } catch {
-              case NonFatal(e) =>
-                logWarning(s"Got NonFatal exception during remove")
-            }
-          case _ =>
-        }
+  def freeMemoryEntry[T <: MemoryEntry[_]](entry: T): Unit = {
+    entry match {
+      case SerializedMemoryEntry(buffer, _, _) => buffer.dispose()
+      case e: DeserializedMemoryEntry[_] => e.value.foreach {
+        case o: AutoCloseable =>
+          try {
+            o.close()
+          } catch {
+            case NonFatal(e) =>
+              logWarning(s"Got NonFatal exception during remove", e)

Review comment:
       nit: s"" is not needed.




-- 
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:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to