Skip to content

use cached blob statter in ManifestService if available - #4595

Merged
milosgajdos merged 1 commit into
distribution:mainfrom
Ollegio:bugfix/clear-cache-on-manifest-delete
Mar 11, 2025
Merged

milosgajdos merged 1 commit into
distribution:mainfrom
Ollegio:bugfix/clear-cache-on-manifest-delete

Conversation

@Ollegio

@Ollegio Ollegio commented Mar 11, 2025 •

Copy link
Copy Markdown

Fixes #4569, #3322

@milosgajdos milosgajdos left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

PTAL @thaJeztah

@milosgajdos
milosgajdos requested a review from davidspek March 11, 2025 14:37
Comment thread registry/storage/registry.go Outdated
Comment on lines -8 to -11
"github.com/distribution/reference"

"github.com/distribution/distribution/v3"
"github.com/distribution/distribution/v3/registry/storage/cache"
storagedriver "github.com/distribution/distribution/v3/registry/storage/driver"
"github.com/distribution/reference"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Did we change the convention for grouping in general? If not, then it's better to keep this separate, so that the commits don't make unrelated changes.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

That was my default format settings, didn't notice, thanks, reverted this change

Comment thread registry/storage/manifeststore_test.go Outdated
"github.com/distribution/reference"
"github.com/opencontainers/go-digest"
"github.com/opencontainers/image-spec/specs-go"
v1 "github.com/opencontainers/image-spec/specs-go/v1"

"github.com/distribution/distribution/v3"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Same here

Comment thread registry/storage/manifeststore_test.go Outdated
Comment on lines +651 to +655
func createManifestListDescriptor(t *testing.T, testname string, manifest distribution.Manifest, platformSpec *manifestlist.PlatformSpec) manifestlist.ManifestDescriptor {
func createManifestListDescriptor(
t *testing.T, testname string, manifest distribution.Manifest, platformSpec *manifestlist.PlatformSpec,
) manifestlist.ManifestDescriptor {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This one as well (I think this is only a formatting change, correct?).

@milosgajdos
milosgajdos requested a review from thaJeztah March 11, 2025 15:56
@milosgajdos

Copy link
Copy Markdown
Member

@Ollegio can you squash?

@Ollegio
Ollegio force-pushed the bugfix/clear-cache-on-manifest-delete branch from 483133f to b30274f Compare March 11, 2025 16:42
@Ollegio

Ollegio commented Mar 11, 2025

Copy link
Copy Markdown
Author

@milosgajdos ok, done

@thaJeztah thaJeztah left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

thanks!

LGTM

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.

Garbage collect deletes blobs in disk but blobs are still in memory and registry does not accept the push twice

4 participants