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

storage, dest: clarify when TOCDigest is used #2218

Closed

Conversation

giuseppe
Copy link
Member

This update introduces an enhancement in the blob handling mechanism, specifically by separating the TOC digest from the uncompressed/compressed digest.

Follow-up for: #1080.

Copy link
Collaborator

@mtrmac mtrmac left a comment

Choose a reason for hiding this comment

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

I’m afraid this review is probably way too repetitive, I just wanted to get some first impression out immediately.

The primary concern is that if if we create or reuse a layer by DiffID, vs. create/reuse a layer by TOC, those two layers should have a different ID.

That doesn’t depend on whether the manifest entry has a TOC digest, but whether we used the TOC digest for creating or looking up that particular layer.

copy/single.go Outdated Show resolved Hide resolved
types/types.go Outdated Show resolved Hide resolved
internal/private/private.go Show resolved Hide resolved
internal/private/private.go Outdated Show resolved Hide resolved
internal/private/private.go Show resolved Hide resolved
storage/storage_dest.go Outdated Show resolved Hide resolved
storage/storage_dest.go Outdated Show resolved Hide resolved
storage/storage_dest.go Show resolved Hide resolved
storage/storage_dest.go Outdated Show resolved Hide resolved
storage/storage_dest.go Outdated Show resolved Hide resolved
@giuseppe giuseppe force-pushed the storage-dest-refactor-partial-pulls branch 4 times, most recently from 43a6803 to f8127e9 Compare December 15, 2023 10:30
@giuseppe giuseppe marked this pull request as ready for review December 15, 2023 10:32
@giuseppe
Copy link
Member Author

opened a PR for c/storage to not allow two TOCs to be specified: containers/storage#1778

@rhatdan
Copy link
Member

rhatdan commented Jan 5, 2024

Container storage PR merged, can we move this forward?

@mtrmac
Copy link
Collaborator

mtrmac commented Jan 5, 2024

  • Outstanding review comments, AFAICT
  • Immediate higher priorities, so I won’t revisit now just to verify

@mtrmac
Copy link
Collaborator

mtrmac commented Jan 5, 2024

@rhatdan If you want to help move things forward, consider working on #1980 (comment) . If nothing else, that on is a showstopper and if I run out of time, I’m going to do something drastic.

@giuseppe
Copy link
Member Author

giuseppe commented Jan 8, 2024

this PR is not addressing the comment #1980 (comment) but only to make clearer when the TOC digest is used. I'll take a look at that separately.

@giuseppe giuseppe force-pushed the storage-dest-refactor-partial-pulls branch from d5eeca7 to dc31ecd Compare January 8, 2024 12:00
@giuseppe
Copy link
Member Author

giuseppe commented Jan 8, 2024

opened a PR for c/storage for the outstanding issue with converted images (#1980 (comment)):

@giuseppe giuseppe force-pushed the storage-dest-refactor-partial-pulls branch from dc31ecd to 7e8a196 Compare January 9, 2024 14:55
@giuseppe
Copy link
Member Author

can we move this forward?

@giuseppe giuseppe force-pushed the storage-dest-refactor-partial-pulls branch from 7e8a196 to 73632a7 Compare January 26, 2024 20:12
storage/storage_dest.go Show resolved Hide resolved
storage/storage_dest.go Outdated Show resolved Hide resolved
storage/storage_dest.go Outdated Show resolved Hide resolved
storage/storage_dest.go Show resolved Hide resolved
storage/storage_dest.go Outdated Show resolved Hide resolved
storage/storage_dest.go Outdated Show resolved Hide resolved
copy/single.go Outdated Show resolved Hide resolved
storage/storage_dest.go Outdated Show resolved Hide resolved
Copy link
Collaborator

@mtrmac mtrmac left a comment

Choose a reason for hiding this comment

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

Most importantly, the design issue around indexing by (compressed) blob digest when individual layers might actually have been pulled/matched by TOC ( #2218 (comment) ) remains outstanding.

Resolving that will almost certainly affect many other areas with review comments.

storage/storage_dest.go Outdated Show resolved Hide resolved
@giuseppe giuseppe force-pushed the storage-dest-refactor-partial-pulls branch 3 times, most recently from 53f4916 to 8d50e4d Compare January 31, 2024 13:52
This update introduces an enhancement in the blob handling mechanism,
specifically by separating the TOC digest from the
uncompressed/compressed digest.

Follow-up for: containers#1080.

Signed-off-by: Giuseppe Scrivano <[email protected]>
@giuseppe giuseppe force-pushed the storage-dest-refactor-partial-pulls branch from 8d50e4d to 56e3443 Compare February 6, 2024 15:59
@rhatdan
Copy link
Member

rhatdan commented Feb 6, 2024

@mtrmac Is this ready to go?

@rhatdan
Copy link
Member

rhatdan commented Feb 6, 2024

LGTM

internal/private/private.go Show resolved Hide resolved
storage/storage_dest.go Show resolved Hide resolved
storage/storage_dest.go Show resolved Hide resolved
storage/storage_dest.go Show resolved Hide resolved
storage/storage_dest.go Show resolved Hide resolved
storage/storage_dest.go Show resolved Hide resolved
storage/storage_dest.go Outdated Show resolved Hide resolved
Copy link
Collaborator

@mtrmac mtrmac left a comment

Choose a reason for hiding this comment

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

Thanks!

I didn’t yet look at the full picture of layer finding/preparation vs. commit, submitting this ~early to point out some of the concerns.

@mtrmac
Copy link
Collaborator

mtrmac commented Feb 6, 2024

(Also note the probably-outstanding comments from earlier reviews.)

@giuseppe
Copy link
Member Author

giuseppe commented Feb 7, 2024

Thanks!

I didn’t yet look at the full picture of layer finding/preparation vs. commit, submitting this ~early to point out some of the concerns.

if it makes things easier, would you mind taking this over since you are already working in the same area in c/image?

@mtrmac
Copy link
Collaborator

mtrmac commented Feb 7, 2024

@giuseppe Let’s try that, I’ll take this over for now. Please note the latter part of #2218 (comment) (related to an image having “the same” chunked layer twice, I think). Either that’s an acceptable limitation for now, or it might need a change in how c/storage creates/uses/processes layers.

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.

3 participants