Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug:一个关于次数扣减的bug #142

Open
kaiqiangweinisongxing opened this issue Nov 28, 2023 · 1 comment
Open

bug:一个关于次数扣减的bug #142

kaiqiangweinisongxing opened this issue Nov 28, 2023 · 1 comment
Assignees

Comments

@kaiqiangweinisongxing
Copy link

Current Behavior

{ "cache": "", "count": { "key": "", "max": 5, "request_body_type": "json", "separator": "", "separator_type": "splite" }, "count_mode": "local", "counter": "", "counter_pusher": "", "key": "", "match": { "params": [{ "key": "", "kind": "int", "value": [""] }], "status_codes": [200, 201, 202, 203, 204, 205, 206, 207, 208, 226] } }
这是我设置"次数扣减"的配置,按理说,请求5次就扣减完了。但实际上我每请求成功2、3次,后续请求就一直失败,响应返回“out of calls”,然后隔几秒又可以成功请求了,循环往复

Expected Behavior

No response

Error Logs

out of calls

Steps to Reproduce

1.设置"次数扣减"的配置(全局)
2.调用api
3.每请求成功2、3次,后续请求就一直失败,响应返回“out of calls”,然后隔几秒又可以成功请求了,循环往复

Environment

  • APINTO version (run apinto version):v0.15.5
  • Operating system (run uname -a):centos7.9
@Dot-Liu Dot-Liu self-assigned this Nov 29, 2023
@Dot-Liu
Copy link
Collaborator

Dot-Liu commented Dec 11, 2023

该问题已经修复,取消本地计数的方式,统一使用Redis计数模式,通过操作Redis对应key值,去增加对应的次数

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

2 participants