use bucket in path in distribution hash (#11634)

Use bucket in erasure distribution hash.

For the rare cases where objects with the same names are uploaded to many buckets.
This commit is contained in:
Klaus Post 2021-02-25 10:11:31 -08:00 committed by GitHub
parent a8e4f64ff3
commit 85620dfe93
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -283,7 +283,7 @@ func (er erasureObjects) newMultipartUpload(ctx context.Context, bucket string,
} }
dataBlocks := len(onlineDisks) - parityBlocks dataBlocks := len(onlineDisks) - parityBlocks
fi := newFileInfo(object, dataBlocks, parityBlocks) fi := newFileInfo(pathJoin(bucket, object), dataBlocks, parityBlocks)
// we now know the number of blocks this object needs for data and parity. // we now know the number of blocks this object needs for data and parity.
// establish the writeQuorum using this data // establish the writeQuorum using this data

View File

@ -654,7 +654,7 @@ func (er erasureObjects) putObject(ctx context.Context, bucket string, object st
// Initialize parts metadata // Initialize parts metadata
partsMetadata := make([]FileInfo, len(storageDisks)) partsMetadata := make([]FileInfo, len(storageDisks))
fi := newFileInfo(object, dataDrives, parityDrives) fi := newFileInfo(pathJoin(bucket, object), dataDrives, parityDrives)
if opts.Versioned { if opts.Versioned {
fi.VersionID = opts.VersionID fi.VersionID = opts.VersionID