-
Notifications
You must be signed in to change notification settings - Fork 267
Clean up inconsistent stores also in readers #1407
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
> go mod edit -replace github.com/containers/storage=github.com/mtrmac/storage@cleanup-in-readers > make vendor Signed-off-by: Miloslav Trmač <mitr@redhat.com>
ce4fcd5 to
4682b8d
Compare
4682b8d to
28cc4ec
Compare
rhatdan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
|
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č <mitr@redhat.com>
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č <mitr@redhat.com>
|
So this was completely ineffective (calling Waiting for another round of downstream tests : containers/buildah#4368 containers/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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes LGTM
Note that I am far from being familiar with the low-level details.
giuseppe
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
flouthoc
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
@mtrmac containers/buildah#4368 containers/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č <mitr@redhat.com>
... instead of combining control flow branches; we will change behavior on some of them. Should not change behavior. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
... 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č <mitr@redhat.com>
- 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č <mitr@redhat.com>
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
... 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č <mitr@redhat.com>
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č <mitr@redhat.com>
> go mod edit -replace github.com/containers/storage=github.com/mtrmac/storage@cleanup-in-readers > make vendor Signed-off-by: Miloslav Trmač <mitr@redhat.com>
[NO NEW TESTS NEEDED] Signed-off-by: Miloslav Trmač <mitr@redhat.com>
|
LGTM |
flouthoc
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/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 .