-
Notifications
You must be signed in to change notification settings - Fork 26
remove the fullSync
option from updateChildEntry
#45
Conversation
Make `updateChildEntry` always propagate the update all the way up to the root, the equivalent of calling it always with `fullSync` set. The case of calling it without setting `fullSync` (a kind of "half-update") where only the parent's directory UnixFS node was updated (but nothing else, leaving the root outdated) seemed of little used. This helps to simplify the logic around the update mechanism in MFS.
1226f22
to
88b8e7b
Compare
fullSync
option from updateChildEntry
fullSync
option from updateChildEntry
/cc @Stebalien |
Test failing. |
There is a race while encoding the ProtoNodes when flushing the MFS (adding it to the DAG service). May be related to ipfs/kubo#4784. Note to self: this patch should have not increased the number of flushes (saves to DAG service), if anything it should have been reduced them (if |
Without the `sync` logic (now removed) the code is simplified for these tightly coupled methods (the first one was the only caller of the second) to be merged in a single `localUpdate` method.
9afa20a
to
8d26210
Compare
I took the |
9790794
to
6c6a2d1
Compare
(last update wafflebot, I swear) |
Pulled changes from ipfs/kubo#4517, on top of, ipfs#45. Change added to unblock the `waitPub()` call. With the elimination of stateSync cause a `updateChildEntry` to happen for `stateFlushed` as well, causing it to propogate upwards to the parent(s) [fullSync] and force a publish to happen, hence unblocking `waitPub`.
6c6a2d1
to
8d26210
Compare
@Stebalien Fixed, thanks for spotting the lock bug. |
LGTM: Merge when ready. Not locking while adding to the local dagservice would be nice if you'd like to do that in a followup PR. We just need to break the first part of that function into a helper function (so we get a new scope for the defer statement). |
Agreed. |
Pulled changes from ipfs/kubo#4517, on top of, ipfs#45. Change added to unblock the `waitPub()` call. With the elimination of stateSync cause a `updateChildEntry` to happen for `stateFlushed` as well, causing it to propogate upwards to the parent(s) [fullSync] and force a publish to happen, hence unblocking `waitPub`.
Closes #39.