marin-ma commented on code in PR #10585:
URL: 
https://github.com/apache/incubator-gluten/pull/10585#discussion_r2315323004


##########
cpp/velox/compute/WholeStageResultIterator.cc:
##########
@@ -102,6 +103,10 @@ WholeStageResultIterator::WholeStageResultIterator(
   fileSystem->mkdir(spillDir);
   task_->setSpillDirectory(spillDir);
 
+  // register the hive connectors
+  std::call_once(
+      gluten::VeloxBackend::get()->regFlag, [&]() { 
gluten::VeloxBackend::get()->initConnector(veloxCfg_); });

Review Comment:
   Wonder if we could register with a unique connector ID for each 
`WholeStageResultIterator` and call `velox::connector::unregisterConnector` 
from the dtor?
   
   The connector ID can use similar naming as the queryID
   
   ```
   fmt::format(
             "Gluten_Stage_{}_TID_{}_VTID_{}",
             std::to_string(taskInfo_.stageId),
             std::to_string(taskInfo_.taskId),
             std::to_string(taskInfo_.vId))
   ```



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

Reply via email to