Merge pull request #989 from nalind/serial-gzip
ApplyDiff: compress saved headers without concurrency
This commit is contained in:
commit
8ffa947637
|
|
@ -27,6 +27,7 @@ import (
|
|||
digest "github.com/opencontainers/go-digest"
|
||||
"github.com/opencontainers/selinux/go-selinux/label"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/vbatts/tar-split/archive/tar"
|
||||
"github.com/vbatts/tar-split/tar/asm"
|
||||
"github.com/vbatts/tar-split/tar/storage"
|
||||
|
|
@ -1529,6 +1530,9 @@ func (r *layerStore) ApplyDiff(to string, diff io.Reader) (size int64, err error
|
|||
if err != nil {
|
||||
compressor = pgzip.NewWriter(&tsdata)
|
||||
}
|
||||
if err := compressor.SetConcurrency(1024*1024, 1); err != nil { // 1024*1024 is the hard-coded default; we're not changing that
|
||||
logrus.Infof("error setting compression concurrency threads to 1: %v; ignoring", err)
|
||||
}
|
||||
metadata := storage.NewJSONPacker(compressor)
|
||||
uncompressed, err := archive.DecompressStream(defragmented)
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Reference in New Issue