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


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/action/index/RunIndexActionExecutor.java:
##########
@@ -180,9 +180,13 @@ public Option<HoodieIndexCommitMetadata> execute() {
         String indexUptoInstant = fileIndexPartitionInfo.getIndexUptoInstant();
         // save index commit metadata and update table config
         // instantiation of metadata writer will automatically instantiate the 
partitions.
-        table.getIndexingMetadataWriter(instantTime)
+        try (HoodieTableMetadataWriter metadataWriter = 
table.getIndexingMetadataWriter(instantTime)

Review Comment:
   🤖 nit: an empty try-with-resources body that relies on the writer's 
construction side-effect reads as unusual. Could you make the intent more 
obvious, e.g. assign to a clearly-named local (`initializingWriter`) or keep 
the explanatory comment but consider whether an explicit `.get()`/no-op would 
read better?
   
   <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