[go: up one dir, main page]

Skip to content

Hide Snapshot prefix from transaction

Currently, the TransactionManager isolates transactions by creating snapshots of accessed repositories. It places these snapshots in the staging directory and modifies the relative path to include a snapshot prefix, e.g., staging/x/y/@Hashed/....

This creates problems for operations that rely on the relative path as a key, since the path becomes transaction-specific and can no longer serve as a stable identifier. While we previously addressed this using the OriginalRepository helper, this approach creates a leaky abstraction: transactions shouldn't be exposed to staging/x/y/... prefixes at all.

This MR resolves the issue by extracting the transaction from context, retrieving the snapshot file system root directory, and returning it as the storage path. This approach conceals the snapshot prefix entirely and ensures the relative paths remain consistent between original and snapshot repositories.

Closes #6095

Merge request reports

Loading