浏览代码

Use DiffSize instead of Size in v1 push

The v1 push code was querying the size of the layer chain up to the
layer it was pushing, rather than just that layer. This made the
progress indicator inaccurate.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Aaron Lehmann 9 年之前
父节点
当前提交
741924384e
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      distribution/push_v1.go

+ 1 - 1
distribution/push_v1.go

@@ -432,7 +432,7 @@ func (p *v1Pusher) pushImage(v1Image v1Image, ep string) (checksum string, err e
 	defer arch.Close()
 
 	// don't care if this fails; best effort
-	size, _ := l.Size()
+	size, _ := l.DiffSize()
 
 	// Send the layer
 	logrus.Debugf("rendered layer for %s of [%d] size", v1ID, size)