clockworklabs / SpacetimeDB

Multiplayer at the speed of light
https://spacetimedb.com
Other
4.41k stars 110 forks source link

commitlog: Introduce epoch #1851

Closed kim closed 2 weeks ago

kim commented 1 month ago

Adds a field epoch typed u64 to the commit header. It signifies the term number of the leader when writing to a commitlog in a distributed setting.

It will help detecting and recovering from divergent logs, a situation which can arise during a leader failover.