# Changelog

## [2.8.0] - 2026-07-09

### Added
- Added learner replicas for zero-downtime cluster expansion and safer cross-region migrations.
- Added incremental snapshot restore, reducing recovery time for large datasets by replaying only WAL segments after the selected checkpoint.
- Added per-prefix request rate limits with separate read, write, and watch quotas.
- Added OpenTelemetry tracing for client requests, Raft proposals, snapshot transfer, and compaction jobs.
- Added `kvctl cluster drain` to move shard leadership away from a node before maintenance.

### Fixed
- Fixed a race where a follower could serve a stale linearizable read immediately after a leadership transfer.
- Fixed WAL replay failing when the final segment contained a valid entry followed by a partial fsync.
- Fixed watch streams occasionally skipping delete events during aggressive compaction.
- Fixed incorrect disk usage reporting for nodes using separate WAL and snapshot volumes.
- Fixed TLS reload failures when certificate files were replaced atomically by external secret managers.

### Changed
- Changed the default election timeout from `1000ms` to `1500ms` to reduce unnecessary leader churn on high-latency networks.
- Changed snapshot transfer to use bounded concurrency so large restores no longer starve foreground traffic.
- Changed the admin API to return structured error codes for membership and replication failures.
- Changed compaction scheduling to prioritize shards with the highest reclaimable space.

## [2.7.1] - 2026-06-18

### Added
- Added Prometheus metrics for proposal queue depth, apply latency, snapshot age, and per-shard leader changes.
- Added `kvctl debug raft-log` for inspecting committed and unapplied entries on offline nodes.
- Added client-side retry classification for `NotLeader`, `LeaseExpired`, and `ShardUnavailable` responses.

### Fixed
- Fixed a memory leak in long-lived watch streams when clients disconnected during backpressure.
- Fixed an issue where expired leases could remain visible after restoring from a snapshot.
- Fixed shard rebalancing getting stuck when a target node was removed during transfer.
- Fixed Go client deadlines not being propagated to internal retry attempts.
- Fixed panic during startup when an empty data directory contained a stale lock file.

### Changed
- Changed client retry backoff defaults to reduce retry storms during leader elections.
- Changed `kvctl backup create` to verify snapshot checksums before reporting success.
- Changed log output for Raft membership changes to include shard ID and term.

## [2.7.0] - 2026-05-29

### Added
- Added multi-key compare-and-swap transactions for keys within the same shard.
- Added encrypted snapshots using AES-256-GCM with KMS-managed data keys.
- Added read-only follower endpoints for eventually consistent analytics workloads.
- Added automatic shard splitting when key ranges exceed configured size or throughput thresholds.
- Added Debian and RPM packages for `amd64` and `arm64`.

### Fixed
- Fixed quorum calculation during joint consensus when replacing multiple failed nodes.
- Fixed duplicate watch delivery after reconnecting with a resume token.
- Fixed high CPU usage in the range scanner when scanning sparse keyspaces.
- Fixed backup retention incorrectly deleting the newest successful backup after clock skew.
- Fixed CLI JSON output for keys containing control characters.

### Changed
- Changed the storage engine format to version `7`; nodes can still read version `6` data files but cannot downgrade after startup.
- Changed default write durability from `majority-ack` to `majority-commit`.
- Changed range scan pagination to use stable revision cursors instead of byte offsets.
- Changed the default maximum value size from `8 MiB` to `16 MiB`.