Skip to content

Lay foundation for integrating and testing WAL

Sami Hiltunen requested to merge smh-wal-ci-jobs into master

PartitionManager is the entry point for the WAL logic. It handles routing transaction to the correct partitions and the lifecycle of TransactionManagers responsible for those partitions. As a first step into integrating it into our tests, wire the PartitionManager into Gitaly's test server. As we eventually want run the tests with both WAL enabled and disabled, the PartitionManager is configured only if 'GITALY_TEST_WAL' environment variable is set. All of the users of the WAL will have to check whether or not it is set. This remains the same when we eventually make it possible to enable the WAL logic through the configuration. If WAL is enabled, we'll configure and dependency inject the PartitionManager. If WAL is disabled, we'll leave it nil.

testPackObjectsConcurrency was changed to use a unique config for each test case so each of the tests have a unique storages for the PartitionManager to initialize state in.

For now, none of the RPCs are using the PartitionManager yet. Regardless, it is enabled in the test when the env is set and its initialization logic runs and is tested. We'll begin gradually integrating the WAL logic in to the RPCs one by one.

With the WAL logic integrated, this MR also adds makefile targets and CI jobs for testing the RPCs with WAL. While none of the RPCs make use of WAL yet, this ensures the logic gets tested as we gradually start integrating the WAL logic.

Closes #5151 (closed)

Merge request reports