You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "ArafatKhan2198 (via GitHub)" <gi...@apache.org> on 2023/06/19 10:34:29 UTC

[GitHub] [ozone] ArafatKhan2198 commented on pull request #4876: HDDS-8701. Recon - Improve Mismatched container info API (containers/v1/mismatch).

ArafatKhan2198 commented on PR #4876:
URL: https://github.com/apache/ozone/pull/4876#issuecomment-1596938781

   > thanks for working on this @ArafatKhan2198, overall it looks good to me, please address the comments by @ashishkumar50, those are good catches.
   > also I just saw you renamed the `prevKey` to `lastKey`, may I ask why? `prevKey` is used often in the Recon code, also in your patch still at several places. I'd go with `prevKey`, the constants are also named in that way.
   
   Thank you for reviewing the code and providing your feedback. Regarding the renaming of prevKey to lastKey, I understand your concern. However, please note that the lastKey you mentioned is not used as a query parameter in the endpoint. It is used as part of the JSON response to implement pagination.
   
   When the getContainerMisMatchInsights method is called, the result is returned, and the last container ID is included in the JSON response as lastKey. This lastKey is not related to the query parameter used in the API endpoint.
   
   Subsequently, when the next set of results is fetched by calling `getContainerMisMatchInsights` again, the `prevKey` query parameter will be set as the `lastKey` response parameter from the previous response, so as to facilitate pagination. 
   And putting lastKey in the response makes more sense as it will contain the container ID of the last record fetched by the API call. 


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org