content/local: don't open file with sync

After running into performance issues when sending in certain kinds of
content, synchronous writes for content have been removed. Content is
still synced on commit, so this shouldn't be necessary.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
This commit is contained in:
Stephen J Day 2017-11-17 16:25:03 -08:00
parent 67232e93dc
commit 5113299cb6
No known key found for this signature in database
GPG Key ID: 67B3DED84EDC823F

View File

@ -499,7 +499,7 @@ func (s *store) writer(ctx context.Context, ref string, total int64, expected di
} }
} }
fp, err := os.OpenFile(data, os.O_WRONLY|os.O_CREATE|os.O_SYNC, 0666) fp, err := os.OpenFile(data, os.O_WRONLY|os.O_CREATE, 0666)
if err != nil { if err != nil {
return nil, errors.Wrap(err, "failed to open data file") return nil, errors.Wrap(err, "failed to open data file")
} }