ivandika3 opened a new pull request, #11002: URL: https://github.com/apache/ozone/pull/11002
## What changes were proposed in this pull request? TrashOzoneFileSystem#listStatus (used by TrashOzoneFileSystem#getTrashRoots) uses Integer.MAX_VALUE as the number of list entries. However, since [HDDS-7290](https://issues.apache.org/jira/browse/HDDS-7290), a single listStatus is limited to ozone.fs.listing.page.size.max configuration, which defaults to 1024. Although it is not common to have more than 1024 trash roots (e.g. which implies 1024 unique users deletes to trash in the same bucket). This might cause some trash roots to not be processed. We can first write a test to validate the issue. One solution is to use a listing iterator to send multiple smaller listStatus API, similar to OzoneFileStatusIterator. We can improve this iterator by persistently storing the current RocksDB iterator across listStatus calls instead of creating one for every listStatus call. Note: The FS client implementation BasicRootedOzoneFileSystem#listStatusAdapter (used by BasicRootedOzoneFileSystem#getTrashRoots) also default to 1024, so it will also have the same issues. However, since getTrashRoots are only used for server-side (OM) trash cleanup, the client-side getTrashRoots are rarely used. ## What is the link to the Apache JIRA https://issues.apache.org/jira/browse/HDDS-13242 ## How was this patch tested? UT (https://github.com/ivandika3/ozone/actions/runs/31576618104). -- 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]
