Repository navigation
Fix upstream deletes across independent peer revision spaces - #185
github-actions[bot] wants to merge 7 commits into
Conversation
Gardener-Operation: op_5e746d3660443aa9d21345f7e9a13aa41dc4605e4a9a3d8b3210451bd0331dd8:bc1b93cc3ac5de32532ffba0acf0db9b7c51d98bbdbe7fb2097be51daad0fade
|
commit: |
scuffi
left a comment
There was a problem hiding this comment.
Devin Review found 3 potential issues.
- Let a remote delete win over a pulled version awaiting its echo push by recording revs minted by pull applies (_vfs_upstream_revs). - Check every node in a deleted directory's subtree, not only the directory, so unpushed descendant edits are protected. - Compare against the full push cursor (rev and path), so same-rev paths beyond a partial push are protected. Gardener-Operation: op_29ef360a754d42b37e0381356c12af6d78734c3a98f528dc18cd8bad69630a27:2fb95d57eb10338caf78fbb6584c0a03f9ecadd85a8ac4c0c72bf4de4f4fa155
|
I reproduced all three findings (each is reported twice, by Devin and again by hand) with failing tests on f78ff4b. The proposed commit fixes them in Remote deletes resurrect pulled files: fixed. Pull applies now record the local revs they mint, per backend, in a new
Directory deletes discard unpushed child edits: fixed. The guard now walks the whole subtree being deleted with a recursive CTE. It protects the delete if any node is past the push cursor and was not minted by a pull.
Partial pushes lose unshipped same-rev changes: fixed. The guard compares
Every Checks run, all passing:
|
A pulled write to one name of a hardlinked file no longer marks the shared inode's new rev as upstream while that inode holds an unpushed local version, so a later remote delete of another name cannot discard the local link. Gardener-Operation: op_789a00a9ac036c1a03cabf304c4c0ed4a78f5d010d9a28320a7422d516373113:b1b75f82ac55517fe6e1459d845c0232ecd34eb183e361f5c43e4bdb561d57e4
|
Unpushed hardlinks lost after remote writes: fixing in the proposed commit. I reproduced it on 4f13766. A pull that rewrites
The three duplicate threads by scuffi (remote deletes resurrect pulled files, directory deletes discard child edits, partial pushes lose same-rev changes) repeat Devin's round-1 findings. They were fixed in 4f13766, and Devin has resolved its copies. The round-1 tests still pass, so I made no further change for them. Checks I ran, all passing:
A bare |
scuffi
left a comment
There was a problem hiding this comment.
Please address the open hardlink thread in packages/dofs/src/sync/apply.ts.
A pull that rewrites one name of an inode that has an unpushed hardlink now records its rev for that name only, in _vfs_upstream_paths. A later remote delete of that name gives way, and the unpushed link stays protected. Gardener-Operation: op_bebe0d1a786b63f31da72f41600299520fd0fd4ece1d8b14dd1b05f00af8e766:c7f80763d215ac2584e07dff8913a127a5a51fdb633be3da208666c62c418819
|
Remote deletion of updated hardlink stays blocked: fixed in the proposed commit. When a pull rewrites a name next to an unpushed hardlink, it now records the new rev for that name only, in Review body: the open hardlink thread in Checks run, all passing:
|
Summary
Addresses #167. Requested by #167 (comment).
The existing tombstone guard compares a local node revision with the sender's independent revision counter. Four new integration regressions fail against the original implementation: entry and pack pulls after a high-revision host push, and entry and pack pushes into a higher-revision receiver.
Validation
No real container was required or exercised. Pulls conservatively retain local versions not yet pushed to the selected backend.