Skip to content

Commit

Permalink
dockerImageDestination: hasThreadSafePutBlob -> true
Browse files Browse the repository at this point in the history
Mark dockerImageDestination as thread safe to allow parallel copy
operations of an image's blobs to a registry.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
  • Loading branch information
vrothberg committed Jan 17, 2019
1 parent 88168b8 commit 12eacf6
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions docker/docker_image_dest.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ func (c *sizeCounter) Write(p []byte) (n int, err error) {

// HasThreadSafePutBlob indicates whether PutBlob can be executed concurrently.
func (d *dockerImageDestination) HasThreadSafePutBlob() bool {
return false
return true
}

// PutBlob writes contents of stream and returns data representing the result (with all data filled in).
Expand Down Expand Up @@ -307,9 +307,7 @@ func (d *dockerImageDestination) TryReusingBlob(ctx context.Context, info types.
// Whatever happens here, don't abort the entire operation. It's likely we just don't have permissions, and if it is a critical network error, we will find out soon enough anyway.

// Checking candidateRepo, and mounting from it, requires an
// expanded token scope. We still want to reuse the ping
// information and other aspects of the client, so rather than
// make a fresh copy, there is this a bit ugly extraScope hack.
// expanded token scope.
extraScope := &authScope{
remoteName: reference.Path(candidateRepo),
actions: "pull",
Expand Down

0 comments on commit 12eacf6

Please sign in to comment.