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

nats-io / nats-server / 6595305271
83%

Build:
DEFAULT BRANCH: main
Ran 21 Oct 2023 05:18AM UTC
Jobs 1
Files 53
Run time 3s
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

20 Oct 2023 04:29PM UTC coverage: 85.164% (-0.09%) from 85.25%
6595305271

push

github

web-flow
Raft state machine tweaks (#4684)

This PR does the following:

1. Replaces `state` with an atomic, which can be accessed lock-free
instead of needing to take the group mutex
2. Ensures that `runAsFollower`, `runAsLeader`, `runAsCandidate` can
only continue running as long as the `state` is correct (they will stop
looping and hand back to `run` if not)
3. Removes the `isLeader` atomic, as it is now unnecessary with the
`state` atomic
4. Adds a unit test to prove that we can now recover from the situation
of all nodes being forced into a leaderless follower state, which now
passes with the above changes

Signed-off-by: Neil Twigg <neil@nats.io>

61604 of 72336 relevant lines covered (85.16%)

164705.55 hits per line

Jobs
ID Job ID Ran Files Coverage
1 6595305271.1 21 Oct 2023 05:18AM UTC 0
85.16
GitHub Action Run
Source Files on build 6595305271
Detailed source file information is not available for this build.
  • Back to Repo
  • Github Actions Build #6595305271
  • 0ee1e0e2 on github
  • Prev Build on main (#6583466814)
  • Next Build on main (#6601733032)
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