Skip to content

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

Merged
openshift-merge-bot[bot] merged 4 commits intocontainers:mainfrom
mtrmac:three-people-review
May 22, 2024
Merged

Fix locking bugs from #1916, and one more#1927
openshift-merge-bot[bot] merged 4 commits intocontainers:mainfrom
mtrmac:three-people-review

Conversation

@mtrmac
Copy link
Copy Markdown
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>
@openshift-ci
Copy link
Copy Markdown
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

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

@giuseppe
Copy link
Copy Markdown
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?

mtrmac added 3 commits May 22, 2024 19:13
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 mtrmac force-pushed the three-people-review branch from b24555d to 830c7c6 Compare May 22, 2024 17:14
@mtrmac
Copy link
Copy Markdown
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
Copy Markdown
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
@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