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

nats-io / nats-server / 9426248077
84%

Build:
DEFAULT BRANCH: main
Ran 08 Jun 2024 05:31AM UTC
Jobs 1
Files 55
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

07 Jun 2024 11:47PM UTC coverage: 85.257% (+0.07%) from 85.189%
9426248077

push

github

web-flow
Improve leadership change signaling (#5504)

Because leadership status can sometimes change very quickly and
raft.updateLeadChange() can 'drop' some lead change signals, especially
with the leadc channel having a capacity of one, which means that
sometimes stream.setLeader(isLeader bool) gets called twice in a row
with the same isLeader value.

This could lead to in some cases the sourcing to 'stall' (not all
messages gets sourced) or 'duplicate messages' (more messages than
expected get sourced).

Changes are increasing the leadc channel's size to 32.

The effects of the change can be demonstrated by running the
TestStreamSourcingScalingSourcingManyBenchmark load test a large number
of times (e.g. 100 times): without these changes the test flaps and
fails between 10 and 20% of the time (most of the time 'stalling' but
also sometimes with 'too many'). With the changes over around a hundred
runs not once did the test fail with 'stalling' and only once did it
fail with 'too many' messages (so there's still a bug/corner case that
could result in 'more than expected' messages to be sourced, although it
seems to be a rare occurence (i.e. 1% of the time)).

This is a replacement for #5496

---------

Signed-off-by: Jean-Noël Moyne <jnmoyne@gmail.com>

65670 of 77026 relevant lines covered (85.26%)

946277.52 hits per line

Jobs
ID Job ID Ran Files Coverage
1 9426248077.1 08 Jun 2024 05:31AM UTC 0
85.26
GitHub Action Run
Source Files on build 9426248077
Detailed source file information is not available for this build.
  • Back to Repo
  • Github Actions Build #9426248077
  • 27b8f624 on github
  • Prev Build on main (#9411753283)
  • Next Build on main (#9434031324)
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