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

nats-io / nats-server / 29894217393
77%

Build:
DEFAULT BRANCH: main
Ran 22 Jul 2026 06:41AM UTC
Jobs 1
Files 67
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 Jul 2026 02:10PM UTC coverage: 76.645% (+0.09%) from 76.553%
29894217393

push

github

web-flow
[IMPROVED] Recycle msg block buffer on weak cache GC (#8395)

Follow-up of https://github.com/nats-io/nats-server/pull/8380.

In `firstSeqForSubj` and `recalculateForSubj` the weak cache would be
loaded as a side-effect of `if mb.cacheNotLoaded()` but would not be
weakened again due to missing `mb.finishedWithCache()` calls.

Additionally, if any block's weak caches were GC'ed their buffers
wouldn't be recycled, potentially requiring to re-allocate new buffers
that would otherwise have been recycled for reuse. This PR updates that
too, when a weak cache is garbage collected, it recycles the cache's
buffer back into the block pool. This should prevent pathological cases
where GC runs and collects many weak caches and buffers, to then require
a bunch of allocations of fresh buffers for subsequent block loads, only
to then trigger GC and collect those buffers again.

72379 of 94434 relevant lines covered (76.65%)

429747.68 hits per line

Coverage Regressions

Lines Coverage ∆ File
1753
79.42
0.3% src/github.com/nats-io/nats-server/server/filestore.go
408
70.26
-0.16% src/github.com/nats-io/nats-server/server/monitor.go
17
74.27
-0.16% src/github.com/nats-io/nats-server/server/jetstream_api.go
14
80.36
0.65% src/github.com/nats-io/nats-server/server/raft.go
13
82.97
-0.01% src/github.com/nats-io/nats-server/server/jetstream_cluster.go
7
86.74
0.06% src/github.com/nats-io/nats-server/server/accounts.go
7
63.08
0.02% src/github.com/nats-io/nats-server/server/opts.go
5
72.27
-0.14% src/github.com/nats-io/nats-server/server/memstore.go
4
76.24
-0.07% src/github.com/nats-io/nats-server/server/leafnode.go
3
87.71
0.39% src/github.com/nats-io/nats-server/server/consumer.go
3
85.13
0.28% src/github.com/nats-io/nats-server/server/events.go
2
98.58
-1.42% src/github.com/nats-io/nats-server/server/jetstream_versioning.go
2
86.35
0.04% src/github.com/nats-io/nats-server/server/stream.go
Jobs
ID Job ID Ran Files Coverage
1 29894217393.1 22 Jul 2026 06:41AM UTC 67
76.65
GitHub Action Run
Source Files on build 29894217393
  • Tree
  • List 67
  • Changed 18
  • Source Changed 2
  • Coverage Changed 18
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #29894217393
  • 40359273 on github
  • Prev Build on main (#29804479395)
  • Next Build on main (#29982745260)
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