mirror of
https://github.com/pgsty/minio.git
synced 2026-10-09 19:25:59 +03: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
@@ -423,8 +423,9 @@ func writeXLMetadata(ctx context.Context, disk StorageAPI, bucket, prefix string
|
||||
logger.LogIf(ctx, err)
|
||||
return err
|
||||
}
|
||||
|
||||
// Persist marshaled data.
|
||||
err = disk.AppendFile(bucket, jsonFile, metadataBytes)
|
||||
err = disk.WriteAll(bucket, jsonFile, metadataBytes)
|
||||
logger.LogIf(ctx, err)
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user