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