When loading the state from the database, initializes the FlushLock to one less than the current revision number, until after the state is submitted downstream, and then marks it safe to skip. This way, in the window between when the FlushLock is created and the state is submitted downstream, any flush operations called by other threads will wait.
Fixes #95.
When loading the state from the database, initializes the
FlushLock
to one less than the current revision number, until after the state is submitted downstream, and then marks it safe to skip. This way, in the window between when theFlushLock
is created and the state is submitted downstream, anyflush
operations called by other threads will wait.Sounds a bit sketchy, but I think it's sound.