mirror of
https://github.com/minio/minio.git
synced 2025-11-07 21:02:58 -05:00
Add sync mode for 'xl.json' (#6798)
xl.json is the source of truth for all erasure coded objects, without which we won't be able to read the objects properly. This PR enables sync mode for writing `xl.json` such all writes go hit the disk and are persistent under situations such as abrupt power failures on servers running Minio.
This commit is contained in:
committed by
Nitish Tiwari
parent
cf26c937e4
commit
f1f23f6f11
@@ -159,6 +159,13 @@ func (d *naughtyDisk) DeleteFile(volume string, path string) (err error) {
|
||||
return d.disk.DeleteFile(volume, path)
|
||||
}
|
||||
|
||||
func (d *naughtyDisk) WriteAll(volume string, path string, buf []byte) (err error) {
|
||||
if err := d.calcError(); err != nil {
|
||||
return err
|
||||
}
|
||||
return d.disk.WriteAll(volume, path, buf)
|
||||
}
|
||||
|
||||
func (d *naughtyDisk) ReadAll(volume string, path string) (buf []byte, err error) {
|
||||
if err := d.calcError(); err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user