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

nats-io / nats-server / 21893612374
84%

Build:
DEFAULT BRANCH: main
Ran 11 Feb 2026 06:20AM UTC
Jobs 1
Files 61
Run time 1min
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 Feb 2026 01:59PM UTC coverage: 84.69% (+0.02%) from 84.673%
21893612374

push

github

web-flow
NRG: Improve membership changes checks & leader is caught-up for forwarded proposals (#7809)

This PR improves a couple areas in our Raft logic:
- Instead of scanning the log using
`logContainsUncommittedMembershipChange` after we've won the leader
election, we rely on the scan we do during startup of the Raft node and
set `n.membChanging` if we process such an append entry. If the scan of
`logContainsUncommittedMembershipChange` takes near the minimum election
timeout, we could continuously cycle leader changes without making
progress.
- Don't allow concurrent membership changes if we got forwarded a
peer-removal.
- Only accept forwarded proposals if we're initially caught up as the
new leader. This ensures the new leader gets some time to establish its
leadership, up the `n.commit` based on what's in its log, and not be
immediately overwhelmed by loads of forwarded proposals (for example due
to inactive thresholds deleting consumers). This should help limit the
growth of the log if many forwarded proposals are retried.

Signed-off-by: Maurice van Veen <github@mauricevanveen.com>

74592 of 88077 relevant lines covered (84.69%)

360162.7 hits per line

Uncovered Existing Lines

Lines Coverage ∆ File
2
72.46
-0.45% src/github.com/nats-io/nats-server/server/avl/seqset.go
2
87.09
-0.04% src/github.com/nats-io/nats-server/server/monitor.go
2
86.64
-0.46% src/github.com/nats-io/nats-server/server/util.go
3
79.49
0.06% src/github.com/nats-io/nats-server/server/opts.go
4
73.83
0.03% src/github.com/nats-io/nats-server/server/jetstream_api.go
5
86.3
-0.09% src/github.com/nats-io/nats-server/server/events.go
5
92.35
0.84% src/github.com/nats-io/nats-server/server/route.go
7
85.91
-0.03% src/github.com/nats-io/nats-server/server/stream.go
12
86.91
-0.29% src/github.com/nats-io/nats-server/server/accounts.go
19
82.52
0.26% src/github.com/nats-io/nats-server/server/jetstream_cluster.go
21
83.12
-0.25% src/github.com/nats-io/nats-server/server/memstore.go
29
88.46
-0.19% src/github.com/nats-io/nats-server/server/consumer.go
232
88.28
1.4% src/github.com/nats-io/nats-server/server/raft.go
686
82.67
-0.61% src/github.com/nats-io/nats-server/server/filestore.go
Jobs
ID Job ID Ran Files Coverage
1 21893612374.1 11 Feb 2026 06:20AM UTC 61
84.69
GitHub Action Run
Source Files on build 21893612374
  • Tree
  • List 61
  • Changed 19
  • Source Changed 2
  • Coverage Changed 19
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #21893612374
  • 63a99c54 on github
  • Prev Build on main (#21852673214)
  • Next Build on main (#21934476537)
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