You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/11/22 09:45:08 UTC

[GitHub] [apisix] 840963657 opened a new pull request, #8374: passive healthy code review

840963657 opened a new pull request, #8374:
URL: https://github.com/apache/apisix/pull/8374

   ### Description
   
   <!-- Please include a summary of the change and which issue is fixed. -->
   <!-- Please also include relevant motivation and context. -->
   
   Fixes # (issue)
   
   ### Checklist
   
   - [ ] I have explained the need for this PR and the problem it solves
   - [ ] I have explained the changes or the new features added to this PR
   - [ ] I have added tests corresponding to this change
   - [ ] I have updated the documentation to reflect this change
   - [ ] I have verified that this change is backward compatible (If not, please discuss on the [APISIX mailing list](https://github.com/apache/apisix/tree/master#community) first)
   
   <!--
   
   Note
   
   1. Mark the PR as draft until it's ready to be reviewed.
   2. Always add/update tests for any changes unless you have a good reason.
   3. Always update the documentation to reflect the changes made in the PR.
   4. Make a new commit to resolve conversations instead of `push -f`.
   5. To resolve merge conflicts, merge master instead of rebasing.
   6. Use "request review" to notify the reviewer after making changes.
   7. Only a reviewer can mark a conversation as resolved.
   
   -->
   


-- 
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: notifications-unsubscribe@apisix.apache.org

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


[GitHub] [apisix] 840963657 commented on a diff in pull request #8374: fix: passive healthy code review.

Posted by GitBox <gi...@apache.org>.
840963657 commented on code in PR #8374:
URL: https://github.com/apache/apisix/pull/8374#discussion_r1030167186


##########
apisix/init.lua:
##########
@@ -724,6 +724,7 @@ local function healthcheck_passive(api_ctx)
                                            port or api_ctx.balancer_port,
                                            host,
                                            resp_status)
+                return

Review Comment:
   Loop of the 727 line, the function ends when the loop terminates, so think break and return have the same effect
   ![image](https://user-images.githubusercontent.com/25243232/203505029-970e7ea1-f392-4664-a83a-3632350d98d3.png)
   



-- 
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: notifications-unsubscribe@apisix.apache.org

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


[GitHub] [apisix] spacewander commented on a diff in pull request #8374: fix: passive healthy code review.

Posted by GitBox <gi...@apache.org>.
spacewander commented on code in PR #8374:
URL: https://github.com/apache/apisix/pull/8374#discussion_r1029990705


##########
apisix/init.lua:
##########
@@ -724,6 +724,7 @@ local function healthcheck_passive(api_ctx)
                                            port or api_ctx.balancer_port,
                                            host,
                                            resp_status)
+                return

Review Comment:
   We should use break here?



-- 
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: notifications-unsubscribe@apisix.apache.org

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


[GitHub] [apisix] 840963657 commented on a diff in pull request #8374: fix: passive healthy code review.

Posted by GitBox <gi...@apache.org>.
840963657 commented on code in PR #8374:
URL: https://github.com/apache/apisix/pull/8374#discussion_r1030036297


##########
apisix/init.lua:
##########
@@ -724,6 +724,7 @@ local function healthcheck_passive(api_ctx)
                                            port or api_ctx.balancer_port,
                                            host,
                                            resp_status)
+                return

Review Comment:
   In the second loop, I think break and return have the same effect 



-- 
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: notifications-unsubscribe@apisix.apache.org

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


[GitHub] [apisix] tzssangglass commented on a diff in pull request #8374: fix: passive healthy code review.

Posted by GitBox <gi...@apache.org>.
tzssangglass commented on code in PR #8374:
URL: https://github.com/apache/apisix/pull/8374#discussion_r1042178582


##########
apisix/init.lua:
##########
@@ -724,6 +724,7 @@ local function healthcheck_passive(api_ctx)
                                            port or api_ctx.balancer_port,
                                            host,
                                            resp_status)
+                return

Review Comment:
   in L730, we should use `break`?



-- 
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: notifications-unsubscribe@apisix.apache.org

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


[GitHub] [apisix] spacewander commented on a diff in pull request #8374: fix: passive healthy code review.

Posted by GitBox <gi...@apache.org>.
spacewander commented on code in PR #8374:
URL: https://github.com/apache/apisix/pull/8374#discussion_r1030093849


##########
apisix/init.lua:
##########
@@ -724,6 +724,7 @@ local function healthcheck_passive(api_ctx)
                                            port or api_ctx.balancer_port,
                                            host,
                                            resp_status)
+                return

Review Comment:
   Sorry, I can't get your point. What does "the second loop' mean?



-- 
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: notifications-unsubscribe@apisix.apache.org

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


[GitHub] [apisix] 840963657 commented on pull request #8374: fix: passive healthy code review

Posted by GitBox <gi...@apache.org>.
840963657 commented on PR #8374:
URL: https://github.com/apache/apisix/pull/8374#issuecomment-1323394002

   when resp_status == status, there is no need to perform other loop operations.


-- 
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: notifications-unsubscribe@apisix.apache.org

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


[GitHub] [apisix] 840963657 closed pull request #8374: fix: passive healthy code review.

Posted by "840963657 (via GitHub)" <gi...@apache.org>.
840963657 closed pull request #8374: fix: passive healthy code review.
URL: https://github.com/apache/apisix/pull/8374


-- 
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: notifications-unsubscribe@apisix.apache.org

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


[GitHub] [apisix] tzssangglass commented on a diff in pull request #8374: fix: passive healthy code review.

Posted by GitBox <gi...@apache.org>.
tzssangglass commented on code in PR #8374:
URL: https://github.com/apache/apisix/pull/8374#discussion_r1030093285


##########
apisix/init.lua:
##########
@@ -724,6 +724,7 @@ local function healthcheck_passive(api_ctx)
                                            port or api_ctx.balancer_port,
                                            host,
                                            resp_status)
+                return

Review Comment:
   we should use break here.



-- 
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: notifications-unsubscribe@apisix.apache.org

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