Skip to content

Be clearer about the layer store locking rules#2080

Merged
openshift-merge-bot[bot] merged 1 commit intomainfrom
if-you-want-something-done-DYI2
Sep 3, 2024
Merged

Be clearer about the layer store locking rules#2080
openshift-merge-bot[bot] merged 1 commit intomainfrom
if-you-want-something-done-DYI2

Conversation

@mtrmac
Copy link
Collaborator

@mtrmac mtrmac commented Aug 30, 2024

... as modified by #2036 .

Also document a LOCKING BUG I don't now care to fix.

... as modified by #2036 .

Also document a LOCKING BUG I don't now care to fix.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
@rhatdan
Copy link
Member

rhatdan commented Sep 3, 2024

LGTM
@nalind @saschagrunert @giuseppe @flouthoc PTAL

Copy link
Member

@giuseppe giuseppe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 3, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: giuseppe, mtrmac

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot openshift-merge-bot bot merged commit 7915da6 into main Sep 3, 2024
// and since the rundir cannot be shared for different stores, it is safe to assume the
// current process has exclusive access to it.
//
// LOCKING BUG? the .DiffSize operation does not currently hold an exclusive lock on the primary store.
Copy link
Collaborator

@flouthoc flouthoc Sep 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mtrmac Is this yet to be verified ? I mean about the comment LOCKING BUG? if yes then maybe adding TODO: here would help someone else to revisit this in spare time.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do think it is a locking bug.

It’s not 100% clear to me that it needs to be fixed in entirety — c/image’s “image size” operation uses layer metadata instead of store.ImageSize. There are some callers that use this .DiffSize path, but maybe they could be migrated to the metadata-only implementation. (We would still need to either reimplement, or deprecate, this operation as is…)

But .store.ContainerSize does seem to be impacted, with no obvious alternative implementation.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in #2088. Thanks!

@mtrmac mtrmac deleted the if-you-want-something-done-DYI2 branch September 3, 2024 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants