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

databendlabs / openraft / 15554805464 / 1
88%
main: 88%

Build:
DEFAULT BRANCH: main
Ran 10 Jun 2025 08:47AM UTC
Files 193
Run time 19s
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

10 Jun 2025 08:22AM UTC coverage: 91.019% (+0.7%) from 90.365%
15554805464.1

push

github

drmingdrmer
refactor: tolerate leader state reversion upon restart

When a leader restarted and its log reverted, and tried to re-elect
itself as leader:

And when vote request is rejected and see a greater vote,
it should only update to the non-committed version of the responded vote
to its local state:

This prevents a dangerous scenario when state reversion is allowed:
1. A node was a leader but its state reverted to a previous version;
2. The node restarts and begins election;
3. It receives a vote response containing its own previous leader vote;
4. Without this protection, it would update to that committed vote and
   become leader again;
5. However, it lacks the necessary logs, causing committed entries to be
   lost or inconsistent;

By using the non-committed version, we prevent this reverted node from
becoming leader while still allowing proper vote updates for legitimate
cases.

11168 of 12270 relevant lines covered (91.02%)

88409.33 hits per line

Source Files on job 15554805464.1
  • Tree
  • List 193
  • Changed 18
  • Source Changed 2
  • Coverage Changed 18
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 15554805464
  • b262f054 on github
  • Prev Job for on main (#15406793779.1)
  • Next Job for on main (#15557612117.1)
  • 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