mirror of https://github.com/minio/minio.git
truncate xl.meta files upon rewrites #11749)
If the destination files exist and is larger - junk data will be left at the end of the file.
This commit is contained in:
parent
0d124095ea
commit
fdc2f69218
|
@ -1619,7 +1619,7 @@ func (s *xlStorage) WriteAll(ctx context.Context, volume string, path string, b
|
|||
atomic.AddInt32(&s.activeIOCount, -1)
|
||||
}()
|
||||
|
||||
w, err := s.openFile(volume, path, os.O_CREATE|os.O_WRONLY)
|
||||
w, err := s.openFile(volume, path, os.O_CREATE|os.O_WRONLY|os.O_TRUNC)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue