Skip to content

Support storing key-value data in partitions

Sami Hiltunen requested to merge smh-kv-store into master

Gitaly will have key-value store with transactions but there's currently no way to store key-value data as part of a transaction. This will soon be needed as we're working on repository migrations which will store the details on which migrations have been applied to which repositories in the key-value store. There will likely be other use cases for storing key-value data as well.

Like all writes that we want to persist, the key-value operations need to go through the transaction manager in order to be logged. This ensures they'll be atomic with the other changes in a transaction, backed up as part of the WAL entries and replicated eventually with Raft.

This commit adds support for performing key-value operations as part of a transaction. The key-value operations are staged in the transaction and applied to the partition with the other changes of a transaction when the WAL entry is applied.

The key-value operations are conflict checked to ensure serializability.

Closes Support storing key-value data in partitions (#6088 - closed)

Merge request reports