Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
f483823
Correct and simplify stream assignment check
sciascid Sep 10, 2025
2928b51
Fix use-after-pool bug in `flushPendingMsgsLocked`
neilalexander Sep 10, 2025
1d18d43
Improve buffer reuse logic in `flushPendingMsgsLocked`
neilalexander Sep 10, 2025
887fb39
Return `errNoCache` instead of `errCorruptState` when failing to hydr…
neilalexander Sep 10, 2025
b54592b
When processing a direct get batch (even without NextFor) deleted mes…
jnmoyne Sep 10, 2025
e7a207d
Make decodeAppendEntry a package-level function
sciascid Sep 9, 2025
fcbbdd3
Additional guards for `msgFromBufEx`
neilalexander Sep 11, 2025
eb99def
Change extended DataStats fields to pointers and export
bruth Sep 11, 2025
8c0c07f
NRG: Don't send append entry if not leader
MauriceVanVeen Sep 11, 2025
ae4e28c
[FIXED] Restore non-ordered sequences in filestore msg blocks
MauriceVanVeen Sep 12, 2025
ccd43c2
Prove index build on unexpected sequence, reuse allocations when poss…
neilalexander Sep 12, 2025
ac350bc
Improve filestore corrupt message errors
neilalexander Sep 12, 2025
ec82696
remove broken windows arm build
alexbozhenko Sep 12, 2025
fe3d988
set build host in goreleaser to have reproducible rpms
alexbozhenko Sep 12, 2025
a0fc3b9
Update dependencies
neilalexander Sep 16, 2025
da06129
Fix small typos in leafnode.go and rerun CI
yoonseo-han Sep 22, 2025
f94f013
[IMPROVED] Remove TTL when removing message
MauriceVanVeen Sep 22, 2025
5b8e0ba
[IMPROVED] Don't load messages while looping through THW
MauriceVanVeen Sep 22, 2025
82c51f5
[FIXED] Msg expiry timer management
MauriceVanVeen Sep 23, 2025
8787c04
Use stack allocations for filestore hash checks
neilalexander Sep 23, 2025
96d5f14
[FIXED] Reset clustered state on msg delete EOF
MauriceVanVeen Sep 23, 2025
cc4856f
[FIXED] Fix subject tree intersection to match literals when combined…
MauriceVanVeen Sep 23, 2025
dd929d7
Fix sublist intersection for aggressive and extended over-matching
neilalexander Sep 24, 2025
ef19b2d
[IMPROVED] Meta snapshot performance without offline assets
MauriceVanVeen Sep 24, 2025
6dfa650
[FIXED] Lost consumers on unsupported offline stream
MauriceVanVeen Sep 24, 2025
94e5374
Use binary search for sequence-from-timestamp lookups
neilalexander Sep 26, 2025
2d51852
Add `BenchmarkFileStoreGetSeqFromTime`
neilalexander Sep 26, 2025
ee15576
[FIXED] Data race on JetStream reserved limits
MauriceVanVeen Sep 25, 2025
6188cf2
Benchmark JS meta snapshots
MauriceVanVeen Sep 26, 2025
84c9a47
[FIXED] Successful exit code during shutdown
MauriceVanVeen Sep 16, 2025
a266a0b
NRG: Replay snapshot upon timeout instead of reset
MauriceVanVeen Sep 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ jobs:

- name: Install cosign
# Use commit hash here to avoid a re-tagging attack, as this is a third-party action
# Commit d58896d6a1865668819e1d91763c7751a165e159 = tag v3.9.2
uses: sigstore/cosign-installer@d58896d6a1865668819e1d91763c7751a165e159
# Commit d7543c93d881b35a8faa02e8e3605f69b7a1ce62 = tag v3.10.0
uses: sigstore/cosign-installer@d7543c93d881b35a8faa02e8e3605f69b7a1ce62

- name: Install syft
# Use commit hash here to avoid a re-tagging attack, as this is a third-party action
Expand Down
4 changes: 4 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ builds:
- 6
- 7
ignore:
- goos: windows
goarch: arm
- goos: darwin
goarch: 386
- goos: freebsd
Expand All @@ -67,6 +69,8 @@ nfpms:
- src: /usr/bin/nats-server
dst: /usr/local/bin/nats-server
type: "symlink"
rpm:
buildhost: synadia.com

archives:
- name_template: "{{.ProjectName}}-{{.Tag}}-{{.Os}}-{{.Arch}}{{if .Arm}}{{.Arm}}{{end}}"
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ require (
github.com/nats-io/nkeys v0.4.11
github.com/nats-io/nuid v1.0.1
go.uber.org/automaxprocs v1.6.0
golang.org/x/crypto v0.41.0
golang.org/x/crypto v0.42.0
golang.org/x/sys v0.36.0
golang.org/x/time v0.13.0
)
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMT
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
go.uber.org/automaxprocs v1.6.0 h1:O3y2/QNTOdbF+e/dpXNNW7Rx2hZ4sTIPyybbxyNqTUs=
go.uber.org/automaxprocs v1.6.0/go.mod h1:ifeIMSnPZuznNm6jmdzmU3/bfk01Fe2fotchwEFJ8r8=
golang.org/x/crypto v0.41.0 h1:WKYxWedPGCTVVl5+WHSSrOBT0O8lx32+zxmHxijgXp4=
golang.org/x/crypto v0.41.0/go.mod h1:pO5AFd7FA68rFak7rOAGVuygIISepHftHnr8dr6+sUc=
golang.org/x/crypto v0.42.0 h1:chiH31gIWm57EkTXpwnqf8qeuMUi0yekh6mT2AvFlqI=
golang.org/x/crypto v0.42.0/go.mod h1:4+rDnOTJhQCx2q7/j6rAN5XDw8kPjeaXEUR2eL94ix8=
golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.36.0 h1:KVRy2GtZBrk1cBYA7MKu5bEZFxQk4NIDV6RLVcC8o0k=
golang.org/x/sys v0.36.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
Expand Down
14 changes: 7 additions & 7 deletions server/consumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -4670,14 +4670,14 @@ func (o *consumer) loopAndGatherMsgs(qch chan struct{}) {
}
if err == ErrStoreMsgNotFound || err == errDeletedMsg || err == ErrStoreEOF || err == errMaxAckPending {
goto waitForMsgs
} else if err == errPartialCache {
s.Warnf("Unexpected partial cache error looking up message for consumer '%s > %s > %s'",
o.mset.acc, stream, o.cfg.Name)
goto waitForMsgs

} else {
s.Errorf("Received an error looking up message for consumer '%s > %s > %s': %v",
o.mset.acc, stream, o.cfg.Name, err)
if pmsg != nil {
s.Errorf("Received an error looking up message with sequence %d for consumer '%s > %s > %s': %v",
pmsg.seq, o.mset.acc, stream, o.cfg.Name, err)
} else {
s.Errorf("Received an error looking up message for consumer '%s > %s > %s': %v",
o.mset.acc, stream, o.cfg.Name, err)
}
goto waitForMsgs
}
}
Expand Down
44 changes: 22 additions & 22 deletions server/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -400,17 +400,17 @@ type GatewayStat struct {
NumInbound int `json:"inbound_connections"`
}

type dataStats struct {
type MsgBytes struct {
Msgs int64 `json:"msgs"`
Bytes int64 `json:"bytes"`
}

// DataStats reports how may msg and bytes. Applicable for both sent and received.
type DataStats struct {
dataStats
Gateways dataStats `json:"gateways,omitempty"`
Routes dataStats `json:"routes,omitempty"`
Leafs dataStats `json:"leafs,omitempty"`
MsgBytes
Gateways *MsgBytes `json:"gateways,omitempty"`
Routes *MsgBytes `json:"routes,omitempty"`
Leafs *MsgBytes `json:"leafs,omitempty"`
}

// Used for internally queueing up messages that the server wants to send.
Expand Down Expand Up @@ -860,13 +860,13 @@ func routeStat(r *client) *RouteStat {
rs := &RouteStat{
ID: r.cid,
Sent: DataStats{
dataStats: dataStats{
MsgBytes: MsgBytes{
Msgs: r.outMsgs,
Bytes: r.outBytes,
},
},
Received: DataStats{
dataStats: dataStats{
MsgBytes: MsgBytes{
Msgs: atomic.LoadInt64(&r.inMsgs),
Bytes: atomic.LoadInt64(&r.inBytes),
},
Expand Down Expand Up @@ -968,7 +968,7 @@ func (s *Server) sendStatsz(subj string) {
// Note that *client.out[Msgs|Bytes] are not set using atomic,
// unlike the in[Msgs|bytes].
gs.Sent = DataStats{
dataStats: dataStats{
MsgBytes: MsgBytes{
Msgs: c.outMsgs,
Bytes: c.outBytes,
},
Expand Down Expand Up @@ -2428,37 +2428,37 @@ func (a *Account) statz() *AccountStat {

a.stats.Lock()
received := DataStats{
dataStats: dataStats{
MsgBytes: MsgBytes{
Msgs: a.stats.inMsgs,
Bytes: a.stats.inBytes,
},
Gateways: dataStats{
Gateways: &MsgBytes{
Msgs: a.stats.gw.inMsgs,
Bytes: a.stats.gw.inBytes,
},
Routes: dataStats{
Routes: &MsgBytes{
Msgs: a.stats.rt.inMsgs,
Bytes: a.stats.rt.inBytes,
},
Leafs: dataStats{
Leafs: &MsgBytes{
Msgs: a.stats.ln.inMsgs,
Bytes: a.stats.ln.inBytes,
},
}
sent := DataStats{
dataStats: dataStats{
MsgBytes: MsgBytes{
Msgs: a.stats.outMsgs,
Bytes: a.stats.outBytes,
},
Gateways: dataStats{
Gateways: &MsgBytes{
Msgs: a.stats.gw.outMsgs,
Bytes: a.stats.gw.outBytes,
},
Routes: dataStats{
Routes: &MsgBytes{
Msgs: a.stats.rt.outMsgs,
Bytes: a.stats.rt.outBytes,
},
Leafs: dataStats{
Leafs: &MsgBytes{
Msgs: a.stats.ln.outMsgs,
Bytes: a.stats.ln.outBytes,
},
Expand Down Expand Up @@ -2591,13 +2591,13 @@ func (s *Server) accountDisconnectEvent(c *client, now time.Time, reason string)
MQTTClient: c.getMQTTClientID(),
},
Sent: DataStats{
dataStats: dataStats{
MsgBytes: MsgBytes{
Msgs: atomic.LoadInt64(&c.inMsgs),
Bytes: atomic.LoadInt64(&c.inBytes),
},
},
Received: DataStats{
dataStats: dataStats{
MsgBytes: MsgBytes{
Msgs: c.outMsgs,
Bytes: c.outBytes,
},
Expand Down Expand Up @@ -2649,13 +2649,13 @@ func (s *Server) sendAuthErrorEvent(c *client) {
MQTTClient: c.getMQTTClientID(),
},
Sent: DataStats{
dataStats: dataStats{
MsgBytes: MsgBytes{
Msgs: c.inMsgs,
Bytes: c.inBytes,
},
},
Received: DataStats{
dataStats: dataStats{
MsgBytes: MsgBytes{
Msgs: c.outMsgs,
Bytes: c.outBytes,
},
Expand Down Expand Up @@ -2711,13 +2711,13 @@ func (s *Server) sendAccountAuthErrorEvent(c *client, acc *Account, reason strin
MQTTClient: c.getMQTTClientID(),
},
Sent: DataStats{
dataStats: dataStats{
MsgBytes: MsgBytes{
Msgs: c.inMsgs,
Bytes: c.inBytes,
},
},
Received: DataStats{
dataStats: dataStats{
MsgBytes: MsgBytes{
Msgs: c.outMsgs,
Bytes: c.outBytes,
},
Expand Down
Loading