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

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 {
return nil, errors.Wrap(err, "failed to open data file")
}