• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

databendlabs / openraft / 27361362374
87%

Build:
DEFAULT BRANCH: main
Ran 11 Jun 2026 04:25PM UTC
Jobs 0
Files 0
Run time –
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
27361362374

push

github

drmingdrmer
feat: removed leader transfers leadership before stepping down

# Summary

A Leader removed from a committed membership config now steps down
gently: after a configurable delay it transfers leadership to the most
up-to-date voter, then reverts itself to a learner as a guaranteed
fallback. The automation runs as a task watching the metrics, outside
the consensus kernel, replacing the tick-driven step down inside
`RaftCore`.

# Details

- Add `Config::removed_leader_step_down: StepDownPolicy`: `After(ms)`
  (default `After(150)`) is the delay counted from the commit of the
  membership config that removes the Leader; `Never` disables the
  automation so the application reverts the Leader manually with
  `Trigger::refresh_server_state()`. In CLI the value is either a
  "never" literal (`never`, `no`, `none`, `off`, `false`,
  case-insensitive) or the number of milliseconds; a config file
  without this field keeps the default via a serde default.

- `StepDownWatcher`, spawned in `Raft::new()`, waits on the server
  metrics channel, which changes only on server state transitions,
  including the commit of a membership config. When this node is a
  Leader not contained in the committed membership config, it sends
  `TriggerTransferLeader` targeting the voter with the greatest
  matching log id, then after another `heartbeat_interval` sends
  `RefreshServerState`. Both commands re-validate the state inside
  `RaftCore`, so acting on stale metrics is a no-op. It holds a weak
  API sender and quits when `RaftCore` terminates.

- Remove the tick-driven step down from `RaftCore`, which polled the
  condition on every tick and reverted the removed Leader without
  transferring leadership, leaving the new cluster to elect a Leader
  only by election timeout.
Source Files on build 27361362374
Detailed source file information is not available for this build.
  • Back to Repo
  • Github Actions Build #27361362374
  • 8da662c5 on github
  • Prev Build on main (#27353408205)
  • Next Build on main (#27397846385)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc