Aireed opened a new issue, #4277:
URL: https://github.com/apache/amoro/issues/4277

   ### Search before asking
   
   - [x] I have searched in the 
[issues](https://github.com/apache/amoro/issues?q=is%3Aissue) and found no 
similar issues.
   
   
   ### What would you like to be improved?
   
   RollingFileCleaner::doCleanFiles deletes files in batches, consider this 
scenario: 
   
   1. the first-level partition is daily, and the second-level partition uses 
bucket(70000, id). 
   2. After I expire data for a certain day, when the snapshot expires, it will 
clean up the files under the 70,000 second-level partitions for that day. 
   3. Since the deletion is batched, after each bucket partition's files are 
deleted, a deleteEmptyDirectory operation will be executed on the daily 
partition.
   
   <img width="1020" height="875" alt="Image" 
src="https://github.com/user-attachments/assets/c0d4032c-b5cf-4d7b-a055-c43ca9003318";
 />
   
   ### How should we improve?
   
   1.remove deleteParentDirectories logical from doCleanFiles
   2.  add cleanParentDirectories() method.
   3. call it in method clear()
   
   ### Are you willing to submit PR?
   
   - [x] Yes I am willing to submit a PR!
   
   ### Subtasks
   
   _No response_
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


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