Skip to content

Acknowledge transactions only after application

Sami Hiltunen requested to merge smh-acknowledge-after-commit into master

TransactionManager is currently ackonwledging transaction commits as soon as the transaction has been logged. This is the ultimate behavior we want to end up with. However, when we rollout the WAL, we want the configuration toggle to be safe to toggle back and forth. The current behavior means that if the WAL is toggled off before the log has been fully applied, we'd effectively lose writes. We can avoid this by only acknowledging the writes once they've been successfully applied to the repository. This way the write will be present even if the WAL is toggled off, or it won't have been acknowledged as committed.

This also makes it easier to integrate the WAL in our tests. Many of the testst inspect disk state directly and do not interrogate the test state through RPCs. This means that the transactions may not be applied to the repository before the tests run their assertiosn on the state. Acknowledging writes only after they've been applied also synchronizes the tests as a side effect.

Part of #5058 (closed)

Merge request reports