You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2021/02/04 04:19:47 UTC

[GitHub] [ozone] symious opened a new pull request #1892: HDDS-4791. StateContext.getReports may return list with size larger t…

symious opened a new pull request #1892:
URL: https://github.com/apache/ozone/pull/1892


   …he maxLimit
   
   ## What changes were proposed in this pull request?
   
   - Fix the logic to return the correct size of the result list.
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-4791
   
   ## How was this patch tested?
   
   Unit Test.
   


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

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


[GitHub] [ozone] symious commented on pull request #1892: HDDS-4791. StateContext.getReports may return list with size larger t…

Posted by GitBox <gi...@apache.org>.
symious commented on pull request #1892:
URL: https://github.com/apache/ozone/pull/1892#issuecomment-788539801


   @smengcl @adoroszlai Thanks for the review.


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

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


[GitHub] [ozone] smengcl edited a comment on pull request #1892: HDDS-4791. StateContext.getReports may return list with size larger t…

Posted by GitBox <gi...@apache.org>.
smengcl edited a comment on pull request #1892:
URL: https://github.com/apache/ozone/pull/1892#issuecomment-784989198


   Thanks @symious for the patch. Yes this was an oversight.
   
   I have the same concern as @adoroszlai mentioned. `maxLimit - nonIncrementalReports.size() < 0` can be a problem.
   
   I agree that we should just remove the `maxLimit` param from `getReports()`:
   
   https://github.com/apache/ozone/blob/6b67ae0c40110af195b897fb70a87dc6e82d467e/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/statemachine/StateContext.java#L327-L330
   
   and put `getIncrementalReports(endpoint, Integer.MAX_VALUE - nonIncrementalReports.size())` inside.


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

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


[GitHub] [ozone] smengcl merged pull request #1892: HDDS-4791. StateContext.getReports may return list with size larger t…

Posted by GitBox <gi...@apache.org>.
smengcl merged pull request #1892:
URL: https://github.com/apache/ozone/pull/1892


   


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

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


[GitHub] [ozone] symious commented on pull request #1892: HDDS-4791. StateContext.getReports may return list with size larger t…

Posted by GitBox <gi...@apache.org>.
symious commented on pull request #1892:
URL: https://github.com/apache/ozone/pull/1892#issuecomment-774067736


   @elek @adoroszlai Could you help to review this PR? Thanks in advance.


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

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


[GitHub] [ozone] smengcl commented on pull request #1892: HDDS-4791. StateContext.getReports may return list with size larger t…

Posted by GitBox <gi...@apache.org>.
smengcl commented on pull request #1892:
URL: https://github.com/apache/ozone/pull/1892#issuecomment-784989198


   Thanks @symious for the patch. Yes this was an oversight.
   
   I have the same concern as @adoroszlai mentioned. `maxLimit - nonIncrementalReports.size() < 0` can be a problem.
   
   I agree that we should just remove the `maxLimit` param from `getReports()`:
   
   https://github.com/apache/ozone/blob/6b67ae0c40110af195b897fb70a87dc6e82d467e/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/statemachine/StateContext.java#L327-L330
   
   and put `getIncrementalReports(endpoint, Integer.MAX_VALUE - 3)` inside, maybe.


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

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


[GitHub] [ozone] symious commented on pull request #1892: HDDS-4791. StateContext.getReports may return list with size larger t…

Posted by GitBox <gi...@apache.org>.
symious commented on pull request #1892:
URL: https://github.com/apache/ozone/pull/1892#issuecomment-785122806


   @adoroszlai @smengcl Thanks for the review, added a commit to handle the edge case. 


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

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