[go: up one dir, main page]

Skip to content

Draft: partition: Implement RestorePartition RPC

We are implementing RestorePartition RPC where it will find the backup entry from the sink and extract it into the transaction file system and record directory/file creation operations. By doing so we will essentially restore the entire repository. Use-case for this RPC is to be run on a new empty gitaly instance. KV restore is intentionally omitted and will be handled later.

Some of the possible issues with the design, that are open to discussion:

  1. Currently RPC expects repository relative path, this is because otherwise we can't get a write transaction. Not sure how this would work with fork repositories, object pools etc.
  2. In the gitaly-backup tool, I currently integrated this RPC by expecting partition ID and relative path to be able to restore single partition. But later this should be able to read the manifest and restore every partition from it. And because of the relative path issue described above, It means backup manifest should also contain relative path of the repository?
  3. Since it is expected to run on an empty gitaly instance where there are no partitions yet, It relies on the fact that partition manager will create the partition implicitly when we are creating transaction in the middleware.

Closes #6270 (closed)

Edited by Mustafa Bayar

Merge request reports

Loading