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

nats-io / nats-server / 17146304570
82%

Build:
DEFAULT BRANCH: main
Ran 22 Aug 2025 05:45AM UTC
Jobs 1
Files 60
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

21 Aug 2025 12:17PM UTC coverage: 85.93% (+0.06%) from 85.873%
17146304570

push

github

web-flow
[FIXED] 'cluster_traffic: owner' is forgotten after restart (#7191)

`cluster_traffic: owner` can be used to have replication traffic go over
the account "owning" the stream, versus this traffic going over the
system account (`cluster_traffic: system`/default).

When pushing an updated JWT to all servers, all these servers would
correctly update their `cluster_traffic` setting.

However, if a server was restarted it would "forget" `cluster_traffic:
owner` was set, and revert back to `cluster_traffic: system`. This would
put this single server to be unable to communicate with the remainder of
the cluster. Restarting the rest of the cluster would have them also
revert back to `cluster_traffic: system`, which would allow them to
communicate again. But, without respecting the `cluster_traffic: owner`
setting on the account.

This PR fixes that by ensuring `cluster_traffic` can be updated at the
same time as that JetStream is enabled for that particular account upon
startup.

Due to this issue, if a server with this fix is deployed, it will not be
able to communicate with the other servers that had reverted back to
`cluster_traffic: system`. A clean upgrade path for this would be:
- Temporarily update the account to have `cluster_traffic: system`. If
all servers were restarted they were already on this setting. Any
servers that were not yet restarted will now agree on this setting.
- Upgrade all servers to the new server version with this fix.
- Update the account to have `cluster_traffic: owner` again. It should
now be remembered even after a server restart.

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

73056 of 85018 relevant lines covered (85.93%)

366393.59 hits per line

Uncovered Existing Lines

Lines Coverage ∆ File
2
98.23
-1.77% src/github.com/nats-io/nats-server/server/jetstream_versioning.go
3
90.94
-0.12% src/github.com/nats-io/nats-server/server/leafnode.go
4
95.72
-0.37% src/github.com/nats-io/nats-server/server/websocket.go
5
72.8
-0.14% src/github.com/nats-io/nats-server/server/jetstream_api.go
5
85.08
0.02% src/github.com/nats-io/nats-server/server/stream.go
12
95.13
-0.09% src/github.com/nats-io/nats-server/server/client.go
19
88.17
-0.22% src/github.com/nats-io/nats-server/server/consumer.go
27
86.1
-0.38% src/github.com/nats-io/nats-server/server/raft.go
84
81.26
-0.08% src/github.com/nats-io/nats-server/server/jetstream_cluster.go
109
86.93
0.11% src/github.com/nats-io/nats-server/server/accounts.go
Jobs
ID Job ID Ran Files Coverage
1 17146304570.1 22 Aug 2025 05:45AM UTC 60
85.93
GitHub Action Run
Source Files on build 17146304570
  • Tree
  • List 60
  • Changed 15
  • Source Changed 1
  • Coverage Changed 15
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #17146304570
  • d034f648 on github
  • Prev Build on main (#17117328290)
  • Next Build on main (#17171349668)
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