@rljson/fs-agent 0.0.55 → 0.0.57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/fs-agent.js +32 -1
- package/package.json +1 -1
package/dist/fs-agent.js
CHANGED
|
@@ -2030,7 +2030,35 @@ ${err.stack}` : String(err);
|
|
|
2030
2030
|
);
|
|
2031
2031
|
const ref = await FsAgent._withRetry(
|
|
2032
2032
|
() => FsAgent._withTimeout(
|
|
2033
|
-
|
|
2033
|
+
// skipNotification, because THIS AGENT broadcasts the ref
|
|
2034
|
+
// itself a few lines below, with the ancestry attached.
|
|
2035
|
+
//
|
|
2036
|
+
// Letting the insert notify sends the ref twice, and the
|
|
2037
|
+
// first copy is the wrong one: the connector attaches
|
|
2038
|
+
// whatever predecessors it currently holds, and this push has
|
|
2039
|
+
// not set its own yet — so the ref goes out carrying the
|
|
2040
|
+
// PREVIOUS push's parent. `_sendRef` then sets the right
|
|
2041
|
+
// ancestry and sends again, and every receiver drops that
|
|
2042
|
+
// second copy as already-received.
|
|
2043
|
+
//
|
|
2044
|
+
// Measured on the lab, sender against receivers:
|
|
2045
|
+
//
|
|
2046
|
+
// sent 6guj63Ox parent yNAJN-wC | seen parent CtAgdd1w
|
|
2047
|
+
// sent UBl35ZQQ parent 6guj63Ox | seen parent yNAJN-wC
|
|
2048
|
+
//
|
|
2049
|
+
// Every push arriving one parent behind. Harmless while
|
|
2050
|
+
// nothing read the ancestry; now that a receiver prunes only
|
|
2051
|
+
// for a sender that names a state it is in, it means a
|
|
2052
|
+
// correctly-formed deletion is refused by everyone — which is
|
|
2053
|
+
// exactly what the large-folder recipe has been reporting.
|
|
2054
|
+
//
|
|
2055
|
+
// The doubled `[sync:out]` line in every log was this, in
|
|
2056
|
+
// plain sight, for the whole investigation.
|
|
2057
|
+
dbAdapter.storeFsTree(tree, {
|
|
2058
|
+
...options,
|
|
2059
|
+
previous,
|
|
2060
|
+
skipNotification: true
|
|
2061
|
+
}),
|
|
2034
2062
|
this._timeouts.fetchTree,
|
|
2035
2063
|
`syncToDb → storeFsTree(${treeKey})`
|
|
2036
2064
|
),
|
|
@@ -2049,6 +2077,9 @@ ${err.stack}` : String(err);
|
|
|
2049
2077
|
connector.invalidateReceived(parentRef);
|
|
2050
2078
|
}
|
|
2051
2079
|
if (ref) {
|
|
2080
|
+
console.log(
|
|
2081
|
+
`[FsAgent] pushing ref=${ref.slice(0, 8)}… parent=${parentRef?.slice(0, 8) ?? "none"} files=${this._getFileContentMap(tree).size}`
|
|
2082
|
+
);
|
|
2052
2083
|
await this._sendRef(
|
|
2053
2084
|
connector,
|
|
2054
2085
|
ref,
|