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

nats-io / nats.go / 44096943097
86%

Build:
DEFAULT BRANCH: main
Ran 17 Nov 2026 01:57PM UTC
Jobs 1
Files 38
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

17 Nov 2026 01:51PM UTC coverage: 85.886% (+0.02%) from 85.87%
44096943097

push

github

piotrpio
[FIXED] Cap StreamState NumDeleted at MaxInt when decoding

On 32-bit platforms int is 32 bits, so stream info with more than 2^31
interior deletes (e.g. MaxMsgsPerSubject=1 with heavy churn) fails to
decode and Stream()/StreamInfo() return an error.

Keep NumDeleted an int and add a custom UnmarshalJSON on StreamState,
in both jetstream and the legacy nats package, that decodes num_deleted
as int64 and caps it to the range of int. Nothing changes on 64-bit
platforms. On 32-bit platforms values beyond the range of int are
reported as math.MaxInt, which is documented on the field.

Resolves #2230

Signed-off-by: Sven Neumann <sven.neumann@holoplot.com>

24 of 32 new or added lines in 2 files covered. (75.0%)

6 existing lines in 2 files now uncovered.

13302 of 15488 relevant lines covered (85.89%)

60629.77 hits per line

Uncovered Changes

Lines Coverage ∆ File
4
50.0
5.26% jetstream/stream_config.go
4
73.06
0.04% jsm.go

Coverage Regressions

Lines Coverage ∆ File
3
84.15
-0.59% jetstream/ordered.go
3
84.73
-0.14% js.go
Jobs
ID Job ID Ran Files Coverage
1 44096943097.1 17 Nov 2026 01:57PM UTC 38
85.89
GitHub Action Run
Source Files on build 44096943097
  • Tree
  • List 38
  • Changed 6
  • Source Changed 2
  • Coverage Changed 6
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #44096943097
  • febd2b97 on github
  • Prev Build on main (#44068581278)
  • Next Build on main (#44273727662)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc