mirror of
https://github.com/pgsty/minio.git
synced 2026-07-19 04:00:25 +03:00
fix: use meta.Erasure.Index for GetObject() to reconstruct object (#10764)
This commit is contained in:
@@ -215,11 +215,12 @@ func (er erasureObjects) GetObject(ctx context.Context, bucket, object string, s
|
||||
}
|
||||
|
||||
func (er erasureObjects) getObjectWithFileInfo(ctx context.Context, bucket, object string, startOffset int64, length int64, writer io.Writer, etag string, opts ObjectOptions, fi FileInfo, metaArr []FileInfo, onlineDisks []StorageAPI) error {
|
||||
tmpDisks := onlineDisks
|
||||
// Reorder online disks based on erasure distribution order.
|
||||
onlineDisks = shuffleDisks(onlineDisks, fi.Erasure.Distribution)
|
||||
onlineDisks = shuffleDisksByIndex(tmpDisks, metaArr)
|
||||
|
||||
// Reorder parts metadata based on erasure distribution order.
|
||||
metaArr = shufflePartsMetadata(metaArr, fi.Erasure.Distribution)
|
||||
metaArr = shufflePartsMetadataByIndex(tmpDisks, metaArr)
|
||||
|
||||
// For negative length read everything.
|
||||
if length < 0 {
|
||||
|
||||
Reference in New Issue
Block a user