Repository navigation
Clean up inconsistent stores also in readers - #1407
Conversation
> go mod edit -replace github.com/containers/storage=github.com/mtrmac/storage@cleanup-in-readers > make vendor Signed-off-by: Miloslav Trmač <[email protected]>
ce4fcd5 to
4682b8d
Compare
4682b8d to
28cc4ec
Compare
|
|
5f161a7 to
c2a3d16
Compare
> go mod edit -replace github.com/containers/storage=github.com/mtrmac/storage@cleanup-in-readers > make vendor Signed-off-by: Miloslav Trmač <[email protected]>
d7eb381 to
9c473b9
Compare
> go mod edit -replace github.com/containers/storage=github.com/mtrmac/storage@cleanup-in-readers > make vendor Signed-off-by: Miloslav Trmač <[email protected]>
|
So this was completely ineffective (calling Waiting for another round of downstream tests : podman-container-tools/buildah#4368 podman-container-tools/podman#16253 ; if they pass, I’m calling this ready for review. |
9c473b9 to
2d1cbd1
Compare
vrothberg
left a comment
There was a problem hiding this comment.
Changes LGTM
Note that I am far from being familiar with the low-level details.
|
@mtrmac podman-container-tools/buildah#4368 podman-container-tools/podman#16253 did not run test the most recent push on this PR |
|
@flouthoc There were no changes to this PR’s code, but, sure, let me rebase and re-test to be sure. |
2d1cbd1 to
c5fb207
Compare
Signed-off-by: Miloslav Trmač <[email protected]>
... instead of combining control flow branches; we will change behavior on some of them. Should not change behavior. Signed-off-by: Miloslav Trmač <[email protected]>
... as an error value instead of just a boolean. That will allow extending the logic to more kinds of inconsistencies, and consolidates the specifics of the inconsistency knowledge into a single place. Signed-off-by: Miloslav Trmač <[email protected]>
- In read-write stores, fail even readers if there are incomplete layers. Right now that would increase observed failures (OTOH with better consistency), but we'll fix that again soon - Decide whether to save read-write stores strictly based on the need to clean up, instead of cleaning up opportunistically (which is less predictable). - Correctly return the right error, depending on whether there are duplicate layers Signed-off-by: Miloslav Trmač <[email protected]>
Signed-off-by: Miloslav Trmač <[email protected]>
Signed-off-by: Miloslav Trmač <[email protected]>
... instead of failing for duplicate names, and instead of ignoring the "incomplete" state of layers. Try up to 3 times if other writers are creating inconsistent state in the meantime. Signed-off-by: Miloslav Trmač <[email protected]>
c5fb207 to
7f6a670
Compare
> go mod edit -replace github.com/containers/storage=github.com/mtrmac/storage@cleanup-in-readers > make vendor Signed-off-by: Miloslav Trmač <[email protected]>
> go mod edit -replace github.com/containers/storage=github.com/mtrmac/storage@cleanup-in-readers > make vendor Signed-off-by: Miloslav Trmač <[email protected]>
[NO NEW TESTS NEEDED] Signed-off-by: Miloslav Trmač <[email protected]>
|
LGTM |
When we reload the store in a reader, drop the lock, lock for writing, reload again to trigger cleanup, and then lock again for reading and proceed with the originally intended operation.
This should fix #1136 , although that’s not yet proven. (It only took 6 weeks of work to get this far…)
Built on top of #1399 and #1406 .