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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]