shreemaan-abhishek opened a new pull request, #10837:
URL: https://github.com/apache/apisix/pull/10837

   ### Description
   
   #### Root cause of the bug:
   When APISIX tries to watch a revision that has been compacted by etcd 
compaction. This case is difficult to reproduce manually, so adding tests for 
this would be very unstable.
   
   To reproduce this manually:
   - Create an upstream where only one node is available:
   ```shell
   curl http://127.0.0.1:9180/apisix/admin/upstreams/1 \
   -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
     {
       "nodes": {
         "127.0.0.1:1980": 1,
         "127.0.0.1:1111": 1
       },
       "retries": 0,
       "name": "测试心跳",
       "type": "roundrobin",
       "timeout": {
         "connect": 60,
         "read": 60,
         "send": 60
       },
       "pass_host": "pass",
       "scheme": "http",
       "keepalive_pool": {
         "idle_timeout": 60,
         "requests": 1000,
         "size": 320
       },
       "checks": {
         "active": {
           "concurrency": 10,
           "healthy": {
             "http_statuses": [
               200,
               302
             ],
             "interval": 1,
             "successes": 2
           },
           "http_path": "/firstwork/healthcheck",
           "timeout": 5,
           "type": "http",
           "unhealthy": {
             "http_failures": 5,
             "http_statuses": [
               429,
               404,
               500,
               501,
               502,
               503,
               504,
               505
             ],
             "interval": 10,
             "tcp_failures": 2,
             "timeouts": 2
           }
         }
       }
     }'
   ```
   - Create a route that references the above upstream:
   ```shell
   curl "http://127.0.0.1:9180/apisix/admin/routes/1"; -X PUT \
     -H "X-API-KEY: ${ADMIN_API_KEY}" \
     -d '
   {
     "uri": "/*",
     "upstream_id": "1",
     "name": "测试心跳问题",
     "methods": [
       "GET",
       "HEAD",
       "POST",
       "PUT",
       "DELETE",
       "OPTIONS",
       "PATCH",
       "CONNECT",
       "TRACE"
     ],
     "priority": 0,
     "enable_websocket": false,
     "status": 1
   }'
   ```
   - send a couple of requests 
   
   
   Fixes #10500
   
   ### 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to