Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions server/jetstream_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -8769,6 +8769,7 @@ func (mset *stream) stateSnapshotLocked() []byte {
Deleted: state.Deleted,
}
b, _ := json.Marshal(snap)
mset.srv.RateLimitWarnf("Stream %q: Using legacy JSON snapshot format. Snapshot length: %d bytes", mset.cfg.Name, len(b))
return b
}

Expand Down
15 changes: 14 additions & 1 deletion server/route.go
Original file line number Diff line number Diff line change
Expand Up @@ -2347,7 +2347,20 @@ func (s *Server) addRoute(c *client, didSolicit, sendDelayedInfo bool, gossipMod
// check to be consistent and future proof. but will be same domain
if s.sameDomain(info.Domain) {
s.nodeToInfo.Store(rHash,
nodeInfo{rn, s.info.Version, s.info.Cluster, info.Domain, id, nil, nil, nil, false, info.JetStream, false, false})
nodeInfo{
name: rn,
version: s.info.Version,
cluster: s.info.Cluster,
domain: info.Domain,
id: id,
tags: nil,
cfg: nil,
stats: nil,
offline: false,
js: info.JetStream,
binarySnapshots: true,
Copy link
Copy Markdown
Member Author

@alexbozhenko alexbozhenko Oct 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was initially added here:
https://github.com/nats-io/nats-server/pull/4284/files#diff-e02d4430ca4d47be9db1b632ddb92d22c34c0919348bc020ce809e64fca8631cR2000

This is kinda hard to read and easy to mess up a struct with bunch of values of similar type.

Maybe add this linter?
https://golangci-lint.run/docs/linters/configuration/#exhaustruct

accountNRG: false,
})
}
}

Expand Down
Loading