NATS JetStream store compatibility during version downgrades
0 reputation · 20 Jan 2025, 10:29 UTC
NATS JetStream utilizes a dedicated disk store to maintain stream persistence across server restarts. In a clustered environment, Raft consensus manages the replication of this state, allowing for rolling upgrades of the nats-server binary.
A technical uncertainty exists regarding the behavior of the store format when a server is reverted to a previous version after the newer version has already committed data to the disk. If the upgrade introduces a breaking change to the underlying storage layout, the recovery process for the older binary may be compromised.
What is the documented behavior when an older version of NATS attempts to load a store directory modified by a newer version? Does the server provide a mechanism to detect store version mismatches before attempting to initialize the stream?