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

nats-io / nats-server / 32691781964
75%

Build:
DEFAULT BRANCH: main
Ran 24 Aug 2026 06:01AM UTC
Jobs 1
Files 68
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 2026 01:50PM UTC coverage: 75.078% (+2.3%) from 72.777%
32691781964

push

github

web-flow
[FIXED] Rejected consumer create destroys existing consumer state (#8491)

This PR fixes a number of issues relating to errors on consumer create:
- `setConsumer` no longer overwrites an existing consumer and
`removeConsumer` only unregisters when the entry is the same instance
that is passed, so a stale consumer with the same name can't evict the
live consumer from `mset.consumers`, `cList` and `csl`.
- The name-exists check now runs before
`mset.store.ConsumerStore(o.name, ...)`, which opened the existing
consumer's on-disk directory and then deleted it when the rejected
create tore itself down.
- Error paths release the temporary consumer with `o.stop()` instead of
`o.deleteWithoutAdvisory()`, which on the early name checks could
`os.RemoveAll` an unrelated stream named `obs` (unlikely but fixed
anyhow).
- The `ackMsgs`/`nextMsgReqs` ipQueues are created after the name-exists
check, since they key `s.ipQueues` by consumer name and the rejected
create overwrote and then unregistered the live consumer's entries.
- `mset.numFilter` is removed, as it was maintained in three places,
never read, and miscounted consumers using `FilterSubjects`.

In practice the name-exists paths above only apply to single/standalone
servers, since clustered paths perform this check elsewhere and would
prevent it.

64280 of 85618 relevant lines covered (75.08%)

364767.77 hits per line

Coverage Regressions

Lines Coverage ∆ File
30
83.09
0.38% src/github.com/nats-io/nats-server/server/jetstream_cluster.go
26
78.47
-0.23% src/github.com/nats-io/nats-server/server/raft.go
7
70.5
5.38% src/github.com/nats-io/nats-server/server/jetstream_api.go
7
61.42
0.86% src/github.com/nats-io/nats-server/server/opts.go
7
85.35
0.15% src/github.com/nats-io/nats-server/server/server.go
6
78.18
1.38% src/github.com/nats-io/nats-server/server/filestore.go
3
87.43
2.97% src/github.com/nats-io/nats-server/server/consumer.go
2
87.25
0.22% src/github.com/nats-io/nats-server/server/client.go
2
93.33
0.24% src/github.com/nats-io/nats-server/server/gateway.go
2
84.19
9.69% src/github.com/nats-io/nats-server/server/stream.go
1
83.59
0.1% src/github.com/nats-io/nats-server/server/events.go
Jobs
ID Job ID Ran Files Coverage
1 32691781964.1 24 Aug 2026 06:01AM UTC 68
75.08
GitHub Action Run
Source Files on build 32691781964
  • Tree
  • List 68
  • Changed 29
  • Source Changed 0
  • Coverage Changed 29
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #32691781964
  • 1787eee0 on github
  • Prev Build on main (#32618910791)
  • Next Build on main (#32810625489)
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