It is never safe for the term number to go backwards for any reason, even in a truncate scenario, as this breaks the consistency guarantees and could cause us to vote again in what should be past elections if more than one node has to truncate back at the same time.
All calls to truncateWAL(...) are after the AE has bumped the term number up if needed, so this is safe for making forward progress.
It is never safe for the term number to go backwards for any reason, even in a truncate scenario, as this breaks the consistency guarantees and could cause us to vote again in what should be past elections if more than one node has to truncate back at the same time.
All calls to
truncateWAL(...)
are after the AE has bumped the term number up if needed, so this is safe for making forward progress.Signed-off-by: Neil Twigg neil@nats.io