why not use different configure option instead of election_timeout_ms for election_timer check interval ?
- Dominant language
- C++
- Stars
- 4.2k
- Forks
- 923
- PR merge metrics
- No merged PRs in 30d
Description
## 问题
目前 braft 中的 election_timer 定时器的周期是 election_timeout_ms (braft 默认 1000,我们的项目配置2000为了避免网络波动导致集群震荡),会间隔 2s 检查一次 leader 是否超时未更新 lease,这使得在leader 故障场景, follower 发起选举时间会最多滞后 4s。
## 想法
在 braft/Node 中引入 election_timer_interval_ms 参数(默认配置 500)
目的是缩短检查周期以快速检查到leader超时。
## 上下文
希望帮忙评估下风险


Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating braft/Node's election_timer and the uses of election_timeout_ms. Trace how the timer checks leader lease freshness and triggers follower elections, then assess the proposed election_timer_interval_ms setting and its risks. Done means the timing behavior and configuration decision are clearly documented, with any required implementation scope identified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- distributed-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100