v2.11.11
nats-io/nats-serverv2.11.11Nov 13, 2025by github-actions[bot]
AI Summary
This release (v2.11.11) of nats-io/nats-server includes Go 1.25.4, new JetStream metalayer compaction options, write_timeout configuration for connections, and significant performance improvements to stream loading and filestore operations. The release also addresses numerous race conditions and data integrity issues in JetStream and filestore.
Key Highlights
- Go version updated to 1.25.4
- New JetStream config options `meta_compact` and `meta_compact_size` for metalayer log snapshotting control
- New `write_timeout` option for clients, routes, gateways, and leafnodes with configurable behavior (default, retry, or close)
- Streams now load in parallel when enabling JetStream, significantly reducing startup time
- Multiple race conditions and data integrity fixes in JetStream and filestore components
New Features
- Added `meta_compact` and `meta_compact_size` advanced JetStream config options for metalayer log compaction control
- Added `write_timeout` option for clients, routes, gateways, and leafnodes with values: default, retry, or close
- Meta cluster snapshot statistics added to `/jsz` endpoint
- Direct consumers can now be shown with `direct-consumers?true` flag on `/jsz` endpoint
- Binary stream snapshots are now preferred by default for nodes on new route connections
- Streams with subject transforms can now implicitly republish based on those transforms using `>` for both source and destination
- Stream catchups now use delete ranges more aggressively for improved performance
Full Release Notes
## Changelog Refer to the [2.11 Upgrade Guide](https://docs.nats.io/release-notes/whats_new/whats_new_211) for backwards compatibility notes with 2.10.x. ### Go Version - 1.25.4 (#7520) ### Dependencies - golang.org/x/crypto v0.43.0 (#7423) - golang.org/x/sys v0.37.0 (#7423) - golang.org/x/time v0.14.0 (#7423) - golang.org/x/sys v0.38.0 (#7538) - github.com/minio/highwayhash 070ab1a (#7539) ### Added JetStream - Added `meta_compact` and `meta_compact_size`, advanced JetStream config options to control how many log entries must be present in the metalayer log before snapshotting and compaction takes place (#7484, #7521) - Added `write_timeout` option for clients, routes, gateways and leafnodes which controls the behaviour on reaching the `write_deadline`, values can be `default`, `retry` or `close` (#7513) Monitoring - Meta cluster snapshot statistics have been added to the `/jsz` endpoint (#7524) - The `/jsz` endpoint can now show direct consumers with the `direct-consumers?true` flag (#7543) ### Improved General - Binary stream snapshots are now preferred by default for nodes on new route connections (#7479) - Reduced allocations in the sublist and subject transforms (#7519) JetStream - Improved the logging for observer mode (#7433) - Improved the performance of enforcing `max_bytes` and `max_msgs` limits (#7455) - Streams and consumers will no longer unnecessarily snapshot when being removed or scaling down (#7495) - Streams are now loaded in parallel when enabling JetStream, often reducing the time it takes to start up the server (#7482) - Stream catchups will now use delete ranges more aggressively, speeding up catchups of large streams with many interior deletes (#7512) - Streams with subject transforms can now implicitly republish based on those transforms by configuring `>` for both republish source and destination (#7515) - A race condition where subscriptions may not be set up before catchup requests are sent after a leader change has been fixed (#7518) - JetStream recovery parallelism now matches the I/O gated semaphore (#7526) - Reduced heap allocations in hash checks (#7539) - Healthchecks now correctly report when streams are catching up, instead of showing them as unhealthy (#7535) - Improve interest detection when consumers are created or deleted across different servers (#7440) Monitoring - The `jsz` monitoring endpoint can now report leader counts (#7429) ### Fixed General - When using message tracing, header corruption when setting the hop header has been fixed (#7443) - Shutting down a server using lame-duck mode should no longer result in max connection exceeded errors (#7527) JetStream - Race conditions and potential panics fixed in the handling of some JetStream API handlers (#7380) - The filestore no longer loses tombstones when using secure erase (#7384) - The filestore no longer loses the last sequence when recovering blocks containing only tombstones (#7384) - The filestore now correctly cleans up empty blocks when selecting the next first block (#7384) - The filestore now correctly obeys `sync_always` for writing TTL and scheduling state files (#7385) - Fixed a data race on a wait group when mirroring streams (#7395) - Skipped message sequences are now checked for ordering before apply, fixing a potential stream desync on catchups (#7400) - Skipped message sequences now correctly detect gaps from erased message slots, fixing potential cache issues, slow reads and issues with catchups (#7399, #7401) - Raft groups now report peer activity more consistently, fixing some cases where asset info and monitoring endpoints may report misleading values after leader changes (#7402) - Raft groups will no longer permit truncations from unexpected catchup entries if the catchup is completed (#7424) - The filestore will now correctly release locks when erasing messages returns an error (#7431) - Caches will now no longer expire unnecessarily when re-reading the same sequences multiple times in first-matching code paths (#7435) - A couple of issues related to header handling have been fixed (#7465) - No-wait requests now return a 400 No Messages response correctly if the stream is empty (#7466) - Raft groups will now only report leadership status after a no-op entry on recovery (#7460) - Fixed a race condition in the filestore that could happen between storing messages and shutting down (#7496) - A panic that could occur when recovering streams in parallel has been fixed (#7503) - An off-by-one when detecting holes at the end of a filestore block has been fixed (#7508) - Writing skip message records in the filestore no longer releases and reacquires the lock unnecessarily (#7508) - Fixed a bug on metalayer recovery where stream and consumer monitor goroutines for recreated assets would run with the wrong Raft group (#7510) - Scaling up an asset from R1 now results in an installed snapshot, allowing recovery after restart if interrupted, avoiding a potential desync (#7509) - Raft groups should no longer report no quorum incorrectly when shutting down (#7522) - Consumers that existed in a metalayer snapshot but were deleted on recovery will no longer result in failing healthchecks (#7523) - An off-by-one when detecting holes at the end of a filestore block has been fixed (#7525) - Fixed a race condition that could happen with shutdown signals when shutting down JetStream (#7536) - Fixed a deadlock that could occur when purging a stream with mismatched consumer state (#7546) ### Complete Changes https://github.com/nats-io/nats-server/compare/v2.11.10...v2.11.11