pythaac commented on PR #10619:
URL: https://github.com/apache/gravitino/pull/10619#issuecomment-4171004235
For your information, already mentioned in earlier comments, both of the
following cases result in an exception during `close()` in my test:
1. The allocator is closed before the datasets
2. The datasets are only invalidated (without being explicitly closed)
before the allocator closes
```
TestLancePartitionStatisticStorage >
testCloseReleasesCachedDatasetBeforeAllocator() FAILED
java.lang.IllegalStateException: Memory was leaked by query. Memory
leaked: (40960)
Allocator(ROOT) 0/40960/40960/9223372036854775807 (res/actual/peak/limit)
at
org.apache.arrow.memory.BaseAllocator.close(BaseAllocator.java:477)
at org.apache.arrow.memory.RootAllocator.close(RootAllocator.java:29)
at
java.base/java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:732)
at
org.apache.arrow.memory.BaseAllocator.close(BaseAllocator.java:415)
at org.apache.arrow.memory.RootAllocator.close(RootAllocator.java:29)
at
org.apache.gravitino.stats.storage.LancePartitionStatisticStorage.close(LancePartitionStatisticStorage.java:358)
at
org.apache.gravitino.stats.storage.TestLancePartitionStatisticStorage.testCloseReleasesCachedDatasetBeforeAllocator(TestLancePartitionStatisticStorage.java:643)
```
These results demonstrate why we must both change the order and explicitly
invoke `dataset.close()`. 🙂
--
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]