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

why not use different configure option instead of election_timeout_ms for election_timer check interval ? #481

Open
hjwsm1989 opened this issue Jan 11, 2025 · 2 comments

Comments

@hjwsm1989
Copy link

问题

目前 braft 中的 election_timer 定时器的周期是 election_timeout_ms (braft 默认 1000,我们的项目配置2000为了避免网络波动导致集群震荡),会间隔 2s 检查一次 leader 是否超时未更新 lease,这使得在leader 故障场景, follower 发起选举时间会最多滞后 4s。

想法

在 braft/Node 中引入 election_timer_interval_ms 参数(默认配置 500)
目的是缩短检查周期以快速检查到leader超时。

上下文

希望帮忙评估下风险
image
image

@hjwsm1989
Copy link
Author

@PFZheng 帮忙看下

@aschenmaker
Copy link

是multi raft么,还是

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

No branches or pull requests

2 participants