ArafatKhan2198 opened a new pull request, #4724: URL: https://github.com/apache/ozone/pull/4724
## What changes were proposed in this pull request? The `getContainers()` method in the container Endpoint has been modified to exclude the container specified by the `prevKey` parameter from the list of containers in the `ContainerResponse`. The getContainers() method changes ensure that: 1. **Skipping the container with the same ID as prevKey**: The container stream is filtered to exclude the container matching prevKey, ensuring it is not included in the results. 2. **Increasing the limit by 1**: If prevKey is greater than zero, the limit is incremented by 1. This fetches an additional container after excluding the container with ID prevKey. 3. **Providing the last container ID**: The last container ID is determined based on the fetched container metadata. If no containers were fetched, last container ID is set to prevKey. Otherwise, it is obtained from the ID of the last container in the list. This information enables pagination and using the last container ID as the new prevKey value for subsequent requests. ## What is the link to the Apache JIRA https://issues.apache.org/jira/browse/HDDS-8502 ## How was this patch tested? Modified the Existing Unit Tests to test out the imrpovements -- 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]
