-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
feat:codis-proxy bigKey/Request fuse protection #2646
base: unstable
Are you sure you want to change the base?
Conversation
# quick command list | ||
quick_cmd_list = "get,set" | ||
# slow command list | ||
slow_cmd_list = "mget, mset" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里还是还原回去吧
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
monitor_log_max_len = 10000 | ||
# set the limitation of result set for xmonitor log | ||
monitor_result_set_size = 20 | ||
# switch for xmonitor,0 is disabled, 1 is enabled |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里是把监控也做了吗
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
是的,除了一些特定的命令外,每一次请求/响应若被判定为bigRequest/Key、HighRisk则会存入日志,以便于使用命令"XMonitor"查看
关闭一个 Proxy 然后重启,其大 key 信息不存在,但 Pika 大 key 信息还存在,造成 Proxy 与 Pika 大 key 信息不一致。 |
When a Proxy is closed and then restarted, its big key information does not exist, but the Pika big key information still exists, causing the Proxy and Pika big key information to be inconsistent. |
) | ||
|
||
const ( | ||
BUCKET_FILL_INTERVAL int64 = 10 // 令牌桶填充间隔,以一秒为单位进行划分,比如值为10,qps为10000,意味着间隔为1s/10 = 100ms,桶容量为10000/10 = 1000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
所有的中文注释,改为英文的
|
||
// 令牌桶操作 | ||
func isAllowed() bool { | ||
if limiterState.Int64() == SWITCH_CLOSED { // 限流器关闭状态,直接返回true,允许请求通过 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return limiterState.Int64() == SWITCH_CLOSED || limiter.Allow()
本 PR 的功能是做大 key 分析吗?还有必要做 熔断 逻辑吗?可以把你的思路和步骤详细的写一下 |
Is the function of this PR to do big key analysis? Is it still necessary to do circuit breaker logic? You can write down your ideas and steps in detail. |
@CodiumAI-Agent /review |
PR Review 🔍
Code feedback:
|
@CodiumAI-Agent /improve |
Failed to generate code suggestions for PR |
#1691
#2228