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

layerStore.Put(): update digest-based indexes when creating from templates #1210

Merged
merged 2 commits into from Apr 19, 2022

Conversation

nalind
Copy link
Member

@nalind nalind commented Apr 18, 2022

When we're creating a layer using another layer as a template, add the new layer's uncompressed and compressed digest to the maps we use to index layers using those digests.

When we forgot to do that, searching for a layer by either would still turn up the original template, so this didn't really break anything.

We also had a case in layerStore.PutAdditionalLayer() where we mistakenly mixed up the uncompressed and compressed digests when populating the by-uncompressed-digest map; fix that while we're in here.

We mistakenly mixed up the uncompressed and compressed digests when
populating the by-uncompressed-digest map.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
…lates

When we're creating a layer using another layer as a template, add the
new layer's uncompressed and compressed digest to the maps we use to
index layers using those digests.

When we forgot to do that, searching for a layer by either would still
turn up the original template, so this didn't really break anything.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Copy link
Member

@vrothberg vrothberg left a comment

Choose a reason for hiding this comment

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

LGTM

Restarted the flaked job.

Copy link
Member

@rhatdan rhatdan left a comment

Choose a reason for hiding this comment

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

LGTM

@rhatdan rhatdan merged commit 1be409a into containers:main Apr 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants