v2.11.10

nats-io/nats-serverv2.11.10Sep 30, 2025by github-actions[bot]

AI Summary

This is a maintenance release of NATS Server v2.11.10 focusing on performance improvements, bug fixes, and dependency updates. Key improvements include faster TTL state management, binary search for timestamp lookups, and reduced heap allocations in the filestore. The release also addresses several critical bugs including use-after-free issues, data races, and disk corruption handling.

Key Highlights

  • Performance improvements: TTL state removal is faster, filestore no longer performs heap allocations for hash checks, and sequence-from-timestamp lookups now use binary search
  • Critical bug fixes: Fixed use-after-free bug in filestore flusher, data race when checking JetStream limits, and Raft layer now enforces non-leader restrictions
  • Improved disk corruption handling: Filestore correctly recovers from out-of-order sequences and produces more useful error messages
  • JetStream API improvements: Requests are handled from worker pool and metalayer snapshots are no longer performed on every stream removal
  • Fixed cluster stability issues: Deleting non-existent sequences no longer triggers cluster reset, and Raft snapshot timeouts no longer cause state resets

New Features

  • Binary search for sequence-from-timestamp lookups (opt_start_time on consumers, start_time on message get requests)
  • Worker pool handling for all JetStream API requests
  • Reduced metalayer snapshots on stream removal requests
  • Simplified stream assignment checks

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.24.7

### Dependencies

- golang.org/x/crypto v0.42.0 (#7320)
- github.com/google/go-tpm v0.9.6 (#7376)
- github.com/nats-io/nats.go v1.46.1 (#7377)

### Improved

General

- Statistics for gateways, routes and leaf connections are now correctly omitted from `accstatsz` responses if empty (#7300)

JetStream

- Stream assignment check has been simplified (#7290)
- Additional guards prevent panics when loading corrupted messages from the filestore (#7299)
- The store lock is no longer held while searching for TTL expiry tasks, improving performance (#7344)
- Removing a message from the TTL state is now faster (#7344)
- The filestore no longer performs heap allocations for hash checks (#7345)
- Meta snapshot performance for a very large number of assets has been improved after a regression in v2.11.9 (#7350)
- Sequence-from-timestamp lookups, such as those using `opt_start_time` on consumers or `start_time` on message get requests, now use a binary search for improved lookup performance (#7357)
- JetStream API requests are always handled from the worker pool, improving the semantics of the API request queue and logging when requests take too long (#7125)
- JetStream will no longer perform a metalayer snapshot on every stream removal request, reducing API pauses and improving meta performance (#7373)

### Fixed

General

- Fixed the exit code when receiving a `SIGTERM` signal immediately after startup (#7367)

JetStream

- Fixed a use-after-free bug and a buffer reclamation issue in the filestore flusher (#7295)
- Direct get requests now correctly skip over deleted messages if the starting sequence is itself deleted (#7291)
- The Raft layer now strictly enforces that non-leaders cannot send append entries (#7297)
- The filestore now correctly handles recovering filestore blocks with out-of-order sequences from disk corruption (#7303, #7304)
- The filestore now produces more useful error messages when disk corruption is detected (#7305)
- Removed messages with a per-message TTL are now removed from the TTL state immediately (#7344)
- Fixed a bug where TTL state was recovered on startup with subject delete markers enabled, that message expiry would not start as expected (#7344)
- Expiring messages from the filestore no longer leaks timers and expires at the correct time (#7344)
- Deleting a non-existent sequence on a stream no longer results in a cluster reset and leadership election (#7348)
- Subject tree intersection now correctly handles overlapping literals and partial wildcards, i.e. `stream.A` and `stream.*.A`, fixing some consumer or message get filters (#7349)
- A data race when checking all JetStream limits has been fixed (#7356)
- Raft will no longer trigger a reset of the clustered state due to a stream snapshot timeout (#7293)

### Complete Changes
 
https://github.com/nats-io/nats-server/compare/v2.11.9...v2.11.10