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

nats-io / nats-server / 16016340362
83%

Build:
DEFAULT BRANCH: main
Ran 02 Jul 2025 05:45AM UTC
Jobs 1
Files 58
Run time 2min
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

01 Jul 2025 11:46AM UTC coverage: 85.724% (-0.03%) from 85.756%
16016340362

push

github

web-flow
[FIXED] reserved_memory and reserved_storage statistics (#7024)

Fixing reserved_memory and reserved_storage statistics when there are
not limits set. Wrong bracketing meant that -1 got added to an uint64
resulting in an underflow. This also broke the .NET client.

Due to missing bracket the MaxBytes>0 check which was supposed to
prevent -1 = unlimited from being added didn't catch.
This resulting in meaningless values. for nats request '$JS.API.INFO'
E.g.:
```
"reserved_memory": 18446744073709551615,   #2^64  -1 (for one memory stream)
"reserved_storage": 18446744073709551614,    #2^64  -2  (for two file streams)
```

This also broke the C# client in some cases (creating a KV) as it
expected to parse an int64 not an uint64

The problem does not occur when the streams have limits. Or when at
least one stream has a limit (so subtracting -1 would not be
noticeable).

Signed-off-by: Michael Röschter <michael@synadia.com>

---------

Signed-off-by: Michael Röschter <michael@synadia.com>
Signed-off-by: Maurice van Veen <github@mauricevanveen.com>
Co-authored-by: Maurice van Veen <github@mauricevanveen.com>

70248 of 81947 relevant lines covered (85.72%)

349605.38 hits per line

Uncovered Existing Lines

Lines Coverage ∆ File
1
85.73
-0.06% src/github.com/nats-io/nats-server/server/memstore.go
2
82.98
0.0% src/github.com/nats-io/nats-server/server/jetstream.go
3
90.64
-0.12% src/github.com/nats-io/nats-server/server/leafnode.go
3
93.65
-0.04% src/github.com/nats-io/nats-server/server/route.go
3
85.33
0.02% src/github.com/nats-io/nats-server/server/stream.go
4
94.52
-0.13% src/github.com/nats-io/nats-server/server/server.go
5
86.45
-0.05% src/github.com/nats-io/nats-server/server/events.go
5
73.3
0.28% src/github.com/nats-io/nats-server/server/jetstream_api.go
6
81.28
-0.02% src/github.com/nats-io/nats-server/server/opts.go
6
85.98
0.58% src/github.com/nats-io/nats-server/server/raft.go
8
94.94
-0.13% src/github.com/nats-io/nats-server/server/client.go
11
88.04
0.21% src/github.com/nats-io/nats-server/server/consumer.go
12
86.67
-0.24% src/github.com/nats-io/nats-server/server/accounts.go
67
83.39
-0.8% src/github.com/nats-io/nats-server/server/filestore.go
673
81.67
0.01% src/github.com/nats-io/nats-server/server/jetstream_cluster.go
Jobs
ID Job ID Ran Files Coverage
1 16016340362.1 02 Jul 2025 05:45AM UTC 58
85.72
GitHub Action Run
Source Files on build 16016340362
  • Tree
  • List 58
  • Changed 19
  • Source Changed 2
  • Coverage Changed 19
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #16016340362
  • 47382b1e on github
  • Prev Build on main (#15990149878)
  • Next Build on main (#16041819168)
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