j7nhai commented on code in PR #10249:
URL:
https://github.com/apache/incubator-gluten/pull/10249#discussion_r2225283555
##########
cpp/velox/memory/VeloxMemoryManager.cc:
##########
@@ -444,6 +444,13 @@ bool VeloxMemoryManager::tryDestructSafe() {
return true;
}
+void VeloxMemoryManager::finalDestructUnsafe() {
+ heldVeloxPools_.clear();
+ veloxLeafPool_.reset();
+ veloxAggregatePool_.reset();
+ veloxMemoryManager_.reset();
Review Comment:
You are right, they will be destructed in order. However, I did find many
cases where the Velox memory manager had already been destructed when dropPool
was called. Maybe we need to perform tryDestructSafe one more time at the end.
Since the sleep time keeps multiplying by 1.5, the last sleep can be over ten
seconds. Doing one more tryDestructSafe at the end can help avoid unnecessary
waiting. At the same time, I have increased the frequency of tryDestructSafe
calls.
--
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]