hudi-agent commented on code in PR #18984:
URL: https://github.com/apache/hudi/pull/18984#discussion_r3653921237


##########
hudi-sync/hudi-hive-sync/src/main/java/org/apache/hudi/hive/ddl/HiveQueryDDLExecutor.java:
##########
@@ -73,6 +86,15 @@ public HiveQueryDDLExecutor(HiveSyncConfig config, 
IMetaStoreClient metaStoreCli
       if (this.hiveDriver != null) {
         this.hiveDriver.close();
       }
+      // driverPool (if present) was already constructed by the caller before 
this
+      // ctor ran; since we're about to throw, no one else will call close() 
on it.
+      driverPool.ifPresent(pool -> {

Review Comment:
   🤖 Nice fix for the try-block path. One gap though: `super(config)` on line 
69 (PartitionValueExtractor reflection init) can throw *before* this try block 
is entered, so this catch never runs — and `HoodieHiveSyncClient`'s constructor 
catch just rethrows without closing `partitionDriverPool` (already built at 
line 134). In that case the pool's worker threads leak. Could the pool also be 
closed in `HoodieHiveSyncClient`'s constructor catch to cover the pre-try 
window?
   
   <sub><i>⚠️ AI-generated; verify before applying. React 👍/👎 to flag 
quality.</i></sub>



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

Reply via email to