Skip to content

Migrate packfile application and HEAD updates to physical logging protocol

Sami Hiltunen requested to merge smh-physical-log-head-packs into master

This MR migrates default branch updating and applying the transaction's logged packs to the physical logging protocol (#5793 (closed)).

  • This commit migrates default branch updates to the physical logging protocol. Instead of logging the logical operation to update the default branch, we log the exact file system operations to update the default branch. This let's us remove the special handling for updating HEAD and use the existing handling for applying the generic file system operations.

    The tests were updated to write the default branch update to the disk where as they were previously staging it only in the transaction. This matches what the RPC handlers would also do.

    As we're now writing the default branch update using 'git symbolic-ref', we remove the tests for invalid default branch updates. The command fails when attempting to stage invalid default branch updates. The RPC handlers should not stage bad state, and the transaction manager should focus on resolving concurrency issues. We can assume the transactions run correctly in isolation.

    DefaultBranchUpdate is removed from the log entry as it is no longer needed.

  • The possible pack included with a transaction is currently handled logically. The base name of the logged pack is included in the transaction and is separately applied to the repository by linking the files derived from the base name to the repository. This is redundant handling as this could be handled via generic file system operations that we log in the physical logging protocol.

    This commit logs the file system operations to be performed in order to apply the pack. As the pack prefix is no longer needed in the log entry, it is removed.

Closes #5845 (closed)
Closes #5853 (closed)

Merge request reports