Repository navigation
Fix concurrency error in registry's pull-through - #14476
openshift-bot merged 2 commits into
Conversation
|
[test][testextended][extended:core(registry)] |
| // The function assumes that localBlobStore is thread-safe. | ||
| func storeLocalInBackground(ctx context.Context, repo *repository, localBlobStore distribution.BlobStore, dgst digest.Digest) { | ||
| // leave only the essential entries in the context | ||
| newCtx := context.WithValue(context.Background(), "instance.id", ctx.Value("instance.id")) |
There was a problem hiding this comment.
docker/distribution/context.Background already provides "instance.id".
I would like to preserve "trace.id", although we don't use distribution/context.WithTrace yet.
There was a problem hiding this comment.
docker/distribution/context.Background already provides "instance.id".
My intention was to make it possible to associate this job with the original request, but a better way to do that would probably be based on http.request.id instead, which is already logged by the logger.
I'll ditch the instance.id and instance.jobid and let the context generate new instance.id instead.
I would like to preserve "trace.id", although we don't use distribution/context.WithTrace yet.
We don't use it yet so I don't see a point in preserving it. Once we start to use it, this function will set the trace.* attributes on its own anyway.
There was a problem hiding this comment.
instance.id is an id of the instance, it is the same across all requests. It is changed only when the application is restarted.
Avoid the use of not thread-safe structures in the pull-through code. The mirroring code spawns a new go-routine that needs to have its own instances of thread-dangerous data. Signed-off-by: Michal Minář <[email protected]>
b6b8b18 to
1fd9b77
Compare
|
There's an extended test failure in @mfojtik's signing workflow test:
Update: fixed. |
1ea95a2 to
56fdb9b
Compare
|
Flake #14496 |
Signed-off-by: Michal Minář <[email protected]>
56fdb9b to
68c0029
Compare
|
Evaluated for origin testextended up to 68c0029 |
|
continuous-integration/openshift-jenkins/testextended SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_request_origin_extended/574/) (Base Commit: 6473593) (Extended Tests: core(registry)) |
|
@soltysh merge please. |
|
Evaluated for origin test up to 68c0029 |
|
Got @dmage approval on IRC. [merge] |
|
Evaluated for origin merge up to 68c0029 |
|
continuous-integration/openshift-jenkins/test FAILURE (https://ci.openshift.redhat.com/jenkins/job/test_pull_request_origin/2002/) (Base Commit: 6473593) |
|
continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/merge_pull_request_origin/949/) (Base Commit: d79627d) (Image: devenv-rhel7_6338) |
Avoid the use of not thread-safe structures in the pull-through code. The mirroring code spawns a new go-routine that needs to have its own instances of thread-dangerous data.
Resolves: #14434