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 2020/12/23 03:04:11 UTC

[GitHub] [apisix] Firstsawyou opened a new issue #3108: bug: limit-count plugin does not take effect

Firstsawyou opened a new issue #3108:
URL: https://github.com/apache/apisix/issues/3108


   ### Issue description
   
   When the `limit-count` plugin is enabled on `service` and `upstream` is the domain name. This will cause the `local key = (ctx.var[conf.key] or "") .. ctx.conf_type .. ctx.conf_version` generated in the limit-count plugin to be inconsistent. When `ctx.conf_version` is deleted (`local key = (ctx.var[conf.key] or "") .. ctx.conf_type`), the plug-in function returns to normal.
   
   Steps to reproduce, will be added later.
   
   ### Environment
   
   * apisix version (cmd: `apisix version`): 2.1
   * OS: (cmd: `uname -a`):centos7
   * OpenResty / Nginx version: (cmd: `nginx -V` or `openresty -V`): openresty/1.19.3.1
   
   ### Minimal test code / Steps to reproduce the issue
   1.
   2.
   3.
   
   ### What's the actual result? (including assertion message & call stack if applicable)
   
   
   
   ### What's the expected result?
   


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



[GitHub] [apisix] moonming commented on issue #3108: bug: limit-count plugin does not take effect

Posted by GitBox <gi...@apache.org>.
moonming commented on issue #3108:
URL: https://github.com/apache/apisix/issues/3108#issuecomment-751301095


   how is the bug?and need test cases to cover


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



[GitHub] [apisix] spacewander closed issue #3108: bug: limit-count plugin does not take effect

Posted by GitBox <gi...@apache.org>.
spacewander closed issue #3108:
URL: https://github.com/apache/apisix/issues/3108


   


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



[GitHub] [apisix] membphis commented on issue #3108: bug: limit-count plugin does not take effect

Posted by GitBox <gi...@apache.org>.
membphis commented on issue #3108:
URL: https://github.com/apache/apisix/issues/3108#issuecomment-750348465


   We need to reproduce this problem first. This bug should not be easy to fix.


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



[GitHub] [apisix] Firstsawyou commented on issue #3108: bug: limit-count plugin does not take effect

Posted by GitBox <gi...@apache.org>.
Firstsawyou commented on issue #3108:
URL: https://github.com/apache/apisix/issues/3108#issuecomment-751268462


   This bug has been fixed in the version after `1.5`. This `bug` can be reproduced in the `1.5` version, but this `bug` cannot be reproduced in the `2.0` version. After comparing the source code of init.lua in the two versions `1.5` and `2.0`, it was found that the bug has been fixed.


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



[GitHub] [apisix] Firstsawyou commented on issue #3108: bug: limit-count plugin does not take effect

Posted by GitBox <gi...@apache.org>.
Firstsawyou commented on issue #3108:
URL: https://github.com/apache/apisix/issues/3108#issuecomment-751308388


   > how is the bug?and need test cases to cover
   
   In version 1.5, the ctx.conf_version generated by different `workers` is different, which leads to this bug. 
   Example:
   
   ```
   limit key: 127.0.0.1route5#1608888724.263, 
   ctx.conf_version: 5#1608888724.263, 
   ngx_worker_pid: : 1813851, 
   
   limit key: 127.0.0.1route5#1608888720.766, 
   ctx.conf_version: 5#1608888720.766,
   ngx_worker_pid: : 1813850,
   ```
   
   In version 2.0, the generated ctx.conf_version between different `workers` is the same. 
   Example:
   
   ```
   limit key-xxx: 1route&service&consumer7570&7560&2, 
   ctx.conf_version: 7570&7560&2,
   worker_pid: 477490,
   
   limit key: 1route&service&consumer7570&7560&2,
   ctx.conf_version: 7570&7560&2,
   worker_pid: 477489,
   ```
   
   Yes, I will submit related test cases for coverage later.


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



[GitHub] [apisix] Firstsawyou commented on issue #3108: bug: limit-count plugin does not take effect

Posted by GitBox <gi...@apache.org>.
Firstsawyou commented on issue #3108:
URL: https://github.com/apache/apisix/issues/3108#issuecomment-750399062


   > We need to reproduce this problem first. This bug should not be easy to fix.
   
   It has not been reproduced so far, and I will provide reproducing steps as soon as possible.


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