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

nats-io / nats-server / 21425568901
85%

Build:
DEFAULT BRANCH: main
Ran 28 Jan 2026 05:59AM UTC
Jobs 1
Files 61
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

27 Jan 2026 11:18AM UTC coverage: 84.752% (+0.2%) from 84.584%
21425568901

push

github

web-flow
[IMPROVED] Remove no interest messages from head of stream (#7766)

When using interest-based streams, messages that no longer have interest
should be removed. For example when deleting a consumer that was the
last one marking interest of subject A, then all messages matching
subject A should be purged from the stream. If this goes above a 100k
threshold, this linear scan will be expensive to perform so we don't
block any other progress from happening. However, this would leave those
messages around until a stream limit is reached.

This PR doesn't fully fix the issue, since the full scan is still
expensive, but it does remove any messages at the "head" of the stream
that have lost interest. For an active interest stream that's
continuously consumed, these messages will be removed naturally without
needing to block by going through them and removing immediately, as
they'll naturally end up at the "head" of the stream and are eligible
for removal.

Resolves https://github.com/nats-io/nats-server/issues/6747,
https://github.com/nats-io/nats-server/issues/7754

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

74449 of 87843 relevant lines covered (84.75%)

354152.83 hits per line

Uncovered Existing Lines

Lines Coverage ∆ File
1
87.2
0.04% src/github.com/nats-io/nats-server/server/monitor.go
2
93.92
0.08% src/github.com/nats-io/nats-server/server/gateway.go
2
90.28
0.04% src/github.com/nats-io/nats-server/server/leafnode.go
2
90.96
-0.19% src/github.com/nats-io/nats-server/server/parser.go
2
93.3
2.51% src/github.com/nats-io/nats-server/server/route.go
2
86.18
0.0% src/github.com/nats-io/nats-server/server/util.go
3
89.91
-0.07% src/github.com/nats-io/nats-server/server/mqtt.go
4
93.82
-0.04% src/github.com/nats-io/nats-server/server/client.go
4
74.24
0.53% src/github.com/nats-io/nats-server/server/jetstream_api.go
7
79.35
-0.1% src/github.com/nats-io/nats-server/server/opts.go
9
86.91
-0.26% src/github.com/nats-io/nats-server/server/accounts.go
9
87.68
0.15% src/github.com/nats-io/nats-server/server/raft.go
10
86.26
-0.28% src/github.com/nats-io/nats-server/server/events.go
41
82.16
-0.22% src/github.com/nats-io/nats-server/server/jetstream_cluster.go
116
83.16
-0.01% src/github.com/nats-io/nats-server/server/memstore.go
246
88.42
0.22% src/github.com/nats-io/nats-server/server/consumer.go
309
86.04
-0.1% src/github.com/nats-io/nats-server/server/stream.go
312
83.17
0.75% src/github.com/nats-io/nats-server/server/filestore.go
Jobs
ID Job ID Ran Files Coverage
1 21425568901.1 28 Jan 2026 05:59AM UTC 61
84.75
GitHub Action Run
Source Files on build 21425568901
  • Tree
  • List 61
  • Changed 23
  • Source Changed 4
  • Coverage Changed 23
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #21425568901
  • eb862052 on github
  • Prev Build on main (#21385057447)
  • Next Build on main (#21466303623)
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