aokolnychyi opened a new pull request, #8685:
URL: https://github.com/apache/iceberg/pull/8685

   This PR implements `AutoCloseable` in `SerializableTableWithSize` to make 
sure resources used by copies of the table on executors are released correctly.
   
   See `freeMemoryEntry` in `MemoryStore`.
   
   ```
   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("Fail to close a memory entry", e)
           }
         case _ =>
       }
     }
   }
   ```


-- 
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.

To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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

Reply via email to