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

nats-io / nats-server / 26621023318
81%

Build:
DEFAULT BRANCH: main
Ran 29 May 2026 07:06AM UTC
Jobs 1
Files 64
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

26 May 2026 03:29PM UTC coverage: 77.138% (+0.8%) from 76.295%
26621023318

push

github

web-flow
(2.14) fix: JetStream consumer lock leak on start sequence error (#8230)

## Summary

This PR fixes a lock leak in JetStream consumer creation.

In `addConsumerWithAssignment`, `mset.mu` is held while creating a
consumer. In the direct/standalone path, if `o.selectStartingSeqNo()`
returns an error, the function currently returns without releasing
`mset.mu`.

This adds the missing `mset.mu.Unlock()` before returning the error.

Resolves #8229 

## Impact

Without this unlock, the stream mutex can remain locked after a starting
sequence error, which may cause later operations on the same stream to
block.

## Changes

- Add the missing `mset.mu.Unlock()` before returning from the
`selectStartingSeqNo()` error path.

## Detection

This issue was reported by
[`goconcurrencylint`](https://github.com/sanbricio/goconcurrencylint).

## Testing

- Not added yet. This is a minimal error-path fix identified by static
analysis.

Signed-off-by: Santiago Bricio <sanbriciorojas11@gmail.com>

72077 of 93439 relevant lines covered (77.14%)

502472.26 hits per line

Coverage Regressions

Lines Coverage ∆ File
33
81.64
0.22% src/github.com/nats-io/nats-server/server/raft.go
24
63.14
0.08% src/github.com/nats-io/nats-server/server/opts.go
17
82.6
0.19% src/github.com/nats-io/nats-server/server/jetstream_cluster.go
9
87.99
0.49% src/github.com/nats-io/nats-server/server/consumer.go
7
78.93
0.6% src/github.com/nats-io/nats-server/server/filestore.go
7
85.57
-0.06% src/github.com/nats-io/nats-server/server/stream.go
5
86.41
-0.15% src/github.com/nats-io/nats-server/server/accounts.go
5
84.46
-0.23% src/github.com/nats-io/nats-server/server/jetstream.go
4
74.36
-0.05% src/github.com/nats-io/nats-server/server/jetstream_api.go
4
85.8
10.05% src/github.com/nats-io/nats-server/server/leafnode.go
3
84.63
0.09% src/github.com/nats-io/nats-server/server/events.go
2
70.91
0.0% src/github.com/nats-io/nats-server/server/memstore.go
2
86.58
0.53% src/github.com/nats-io/nats-server/server/server.go
1
89.67
0.8% src/github.com/nats-io/nats-server/server/client.go
Jobs
ID Job ID Ran Files Coverage
1 26621023318.1 29 May 2026 07:06AM UTC 64
77.14
GitHub Action Run
Source Files on build 26621023318
  • Tree
  • List 64
  • Changed 25
  • Source Changed 0
  • Coverage Changed 25
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #26621023318
  • a948cef0 on github
  • Prev Build on main (#26557710163)
  • Next Build on main (#26676212975)
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