Skip to content

Store WAL state outside of the repository

Sami Hiltunen requested to merge smh-separate-state-dir into master

The TransactionManager is currently storing WAL related state within the repository itself. This is problematic as if the repository itself is removed, so is the write-ahead log as well. Partitions must also support multiple repositories in the future so the WAL storage shouldn't be tied to any single repository. This commit moves the state out from the repository in to a separate directory in the storage.

The state directory is derived by hashing the relative path of a repository. This is done to balance the state directories of partitions into multiple subdirectories similarly as we are doing with hashed storage. The relative path is used as the final component temporarily until we have partition IDs available.

Closes #5453 (closed)

Merge request reports