Skip to content

Commit 2318a41

Browse files
authored
docs: qualify the migration ADR's Store-line fallback (#1177) (#1359)
2 parents e7ce03e + 7cf2b36 commit 2318a41

2 files changed

Lines changed: 22 additions & 3 deletions

File tree

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
---
3+
4+
docs: qualify the migration ADR's descriptor-output guarantee
5+
6+
ADR 0013 said no printed line names the procfs descriptor. Error messages are
7+
translated back to the operator's target, but the `Store:` summary takes a
8+
separate route whose canonicalisation fallback returns `store_path(root)`
9+
unchanged. The ADR now says so. No runtime behaviour changes.

‎docs/rewrite/decisions/0013-pg-to-lmdb-migration.md‎

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -168,9 +168,19 @@ still resolves an absolute name, and a rename inside that pair still reaches the
168168
it needs an fd-relative environment open inside heed, which is a dependency change and not a
169169
change here.
170170

171-
No line the command prints names the descriptor: every message built from a root-joined path is
172-
translated back to the target the operator typed, because `/proc/self/fd/<n>` dies with the
173-
process and is not a path anyone can act on. The cost of the pin, recorded rather than left to be
171+
Every error message built from a root-joined path is translated back to the target the operator
172+
typed, because `/proc/self/fd/<n>` dies with the process and is not a path anyone can act on. The
173+
`Store:` summary is not one of those messages: it takes a separate route, printing
174+
`fs::canonicalize(store_path(root))` and falling back to `store_path(root)` unchanged when
175+
canonicalisation fails. Where `root` is the procfs spelling and the canonicalisation fails, the
176+
line can therefore print `/proc/self/fd/<n>/lmdb`. A pin that is gone is one way to fail, since the
177+
descriptor dies with it. Another is an `lmdb` child renamed after the last manifest write: the pin
178+
holds the target directory, not the store under it, so canonicalising the child can fail while the
179+
pin is open. Neither is a normal run's shape — the pin outlives every use of the root, and the copy
180+
is the only writer while it holds the target — and both need an actor who can write the target,
181+
which is the interval the pin narrows rather than closes.
182+
183+
The cost of the pin, recorded rather than left to be
174184
discovered: `--verify` now opens the target directory itself, so it needs **read** permission on
175185
the target where the path-only version needed search alone, and a `0300` target is refused by the
176186
pin with the target's own path in the line. That is accepted and not mitigated — the target is a

0 commit comments

Comments
 (0)