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

feat: prevent unnecessary conversions #517

Merged
merged 1 commit into from
Aug 18, 2023

Conversation

PerseidMeteor
Copy link

@PerseidMeteor PerseidMeteor commented Aug 8, 2023

Add remote cache of remote registry.

Changes:

  • Skip conversion if layer cache exists.
  • Add two LayerAnnotation as constant labels

pkg/converter/convert_unix.go Outdated Show resolved Hide resolved
pkg/converter/convert_unix.go Outdated Show resolved Hide resolved
pkg/converter/convert_unix.go Outdated Show resolved Hide resolved
pkg/converter/convert_unix.go Outdated Show resolved Hide resolved
pkg/converter/constant.go Outdated Show resolved Hide resolved
pkg/converter/constant.go Outdated Show resolved Hide resolved
pkg/converter/convert_unix.go Outdated Show resolved Hide resolved
@PerseidMeteor PerseidMeteor force-pushed the feat-remote-cache branch 3 times, most recently from 3d64269 to 58fa183 Compare August 9, 2023 15:56
@imeoer
Copy link
Collaborator

imeoer commented Aug 10, 2023

Please also add commit message explaining why and how. :)

@PerseidMeteor PerseidMeteor force-pushed the feat-remote-cache branch 2 times, most recently from 09f7ab6 to 4ea9549 Compare August 14, 2023 15:09
pkg/converter/constant.go Outdated Show resolved Hide resolved
pkg/converter/constant.go Outdated Show resolved Hide resolved
@PerseidMeteor PerseidMeteor force-pushed the feat-remote-cache branch 2 times, most recently from 50e9a10 to a138538 Compare August 15, 2023 03:27
If content store provides remote cache,  we can use remote cache to avoid unnecessary conversions.
The layer converted using cache is the same as the layer converted normally, both containing two annotations: LayerAnnotationUncompressed, LayerAnnotationNydusBlob.
Also add two constant LayerAnnotations labels.

Signed-off-by: breezeTuT <[email protected]>
@imeoer imeoer merged commit f9cfcf0 into containerd:main Aug 18, 2023
16 checks passed
@PerseidMeteor PerseidMeteor deleted the feat-remote-cache branch August 18, 2023 12:26
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