Skip to content
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

Fix locking bugs from #1916, and one more #1927

Merged
merged 4 commits into from
May 22, 2024

Conversation

mtrmac
Copy link
Collaborator

@mtrmac mtrmac commented May 21, 2024

… and add some comments.

See individual commit messages for details.

Cc: @giuseppe

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

openshift-ci bot commented May 21, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mtrmac

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

The pull request process is described here

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

@giuseppe
Copy link
Member

LGTM, just a nit, should "Fix the documentation of store.putLayer" and "Move the containerStore locking inside putLayer" be squashed since the latter changes the comment added by the former?

Should not change behavior.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
There's no need for the callers to deal with this,
and now the API of the function is much less surprising.

Also fix the documentation about locking rlstores.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
As documented at the top of the store type,
the roLayerStores must be locked _before_
the container store.

This is a minimal / conservative fix; this
probably could use a read-only lock only for the
duration of the "LayerID == parent" check.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
@mtrmac
Copy link
Collaborator Author

mtrmac commented May 22, 2024

Thanks!

You’re right that future maintainers won’t care that the changes originally happened for unrelated reasons, and a simpler history helps. Squashed.

@rhatdan
Copy link
Member

rhatdan commented May 22, 2024

/lgtm

@openshift-ci openshift-ci bot added the lgtm label May 22, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit 5cd00c5 into containers:main May 22, 2024
18 checks passed
@mtrmac mtrmac deleted the three-people-review branch May 23, 2024 13:20
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.

3 participants