You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 19, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Nov 19, 2026. It is now read-only.
Consecutive call to Store.Diff() never returns #1433
Hello,
I've a problem using storage package, whenever I run a call to Store.Diff() followed by another call to Store.Diff(), the second call never returns. In the following code, the second print is never called.
I've also tried to debug the code using delve and it seems that store.Diff() is waiting indefinitely for the storage lockfile.
(Fundamentally the test case is… somewhat suspicious. The caller must read the generated diff to the end in order to unlock the store. That said, there are genuine problems.)
For some reason related to s.graphLock, store.getLayerStore() is triggering creation of a separate/refreshed store on the second Diff; and that now requires a write lock, blocking until the output of the first diff is consumed.
As suggested above, this should not be a correctness issue, because callers can make progress by consuming the first diff, but because now more strictly serialize accesses to the store in order to do cleanup, this has the effect of completely serializing Diff calls (and turning parallel pushes into sequential ones).
Note to self: We probably need to drop inProcessLock in #1346 for the same reason.
Now, if only there was any documentation for what graphLock is supposed to be protecting…
Activity
rhatdan commentedon Nov 15, 2022
@mtrmac is this an aria where you have been lately?
mtrmac commentedon Nov 16, 2022
Yes.
(Fundamentally the test case is… somewhat suspicious. The caller must read the generated
diffto the end in order to unlock the store. That said, there are genuine problems.)For some reason related to
s.graphLock,store.getLayerStore()is triggering creation of a separate/refreshed store on the secondDiff; and that now requires a write lock, blocking until the output of the firstdiffis consumed.As suggested above, this should not be a correctness issue, because callers can make progress by consuming the first diff, but because now more strictly serialize accesses to the store in order to do cleanup, this has the effect of completely serializing
Diffcalls (and turning parallel pushes into sequential ones).Note to self: We probably need to drop
inProcessLockin #1346 for the same reason.Now, if only there was any documentation for what
graphLockis supposed to be protecting…mtrmac commentedon Nov 16, 2022
Actually what matters is
diff.Close().mtrmac commentedon Nov 16, 2022
(For the record, this was changed in #1351 , released in 1.43.0 . But the timing of this report WRT ongoing work on #1436 is really very fortunate.)