Introduce version barrier for enabling journal v2 by default
The version barrier requiring min Restate version v1.6.0 will enable the journal v2 by default. It will be written when becoming leader and running at least v1.7.0.
Writing the journal v2 by default changes the logic of the state machine. That's why we are guarding it with a version barrier so that during a rolling upgrade the state machine state won't diverge. A concrete problem is that Restart as new with a non-zero prefix would fail on a node that didn't store the journal entries in the journal v2 table.
This PR is based on #3921.
@tillrohrmann shall i address the comment you made in my pr here directly? Or i do it on my pr and then you rebase here?
@tillrohrmann shall i address the comment you made in my pr here directly? Or i do it on my pr and then you rebase here?
Whatever is easier for you. I don't have a strong opinion. Sorry that I changed the rstest in my PR here w/o waiting for you to get back on that to me.