Akanksha-kedia opened a new pull request, #17070:
URL: https://github.com/apache/pinot/pull/17070

   
   
   ## Problem
   
   In the RealtimeSegmentDataManager class, temporary resources (specifically 
temporary segment folders) were not being properly managed with auto-closeable 
objects. This could potentially lead to resource leaks if exceptions occurred 
during segment building.
   
   ## Solution
   
   Implemented a new TempFolderCloseable class that implements AutoCloseable to 
ensure proper cleanup of temporary segment folders. This class is used with 
Java's try-with-resources pattern to guarantee that temporary resources are 
deleted even when exceptions occur during segment building.
   
   Key changes:
   
   1. Created a TempFolderCloseable class to wrap temporary folder resources
   2. Modified the buildSegmentInternal method to use try-with-resources
   3. Ensured proper indentation and code organization
   4. Added clear comments to improve maintainability
   
   


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