mirror of
https://github.com/minio/minio.git
synced 2025-11-07 12:52:58 -05:00
This PR fixes a regression introduced in https://github.com/minio/minio/pull/19797 by restoring the healing ability of transitioned objects Bonus: support for transitioned objects to carry original The object name is for future reverse lookups if necessary. Also fix parity calculation for tiered objects to n/2 for n/2 == (parity)
This commit is contained in:
@@ -78,7 +78,7 @@ func optimalPartSize(objectSize int64) (partSize int64, err error) {
|
||||
return partSize, nil
|
||||
}
|
||||
|
||||
func (m *warmBackendMinIO) Put(ctx context.Context, object string, r io.Reader, length int64) (remoteVersionID, error) {
|
||||
func (m *warmBackendMinIO) PutWithMeta(ctx context.Context, object string, r io.Reader, length int64, meta map[string]string) (remoteVersionID, error) {
|
||||
partSize, err := optimalPartSize(length)
|
||||
if err != nil {
|
||||
return remoteVersionID(""), err
|
||||
@@ -87,10 +87,15 @@ func (m *warmBackendMinIO) Put(ctx context.Context, object string, r io.Reader,
|
||||
StorageClass: m.StorageClass,
|
||||
PartSize: uint64(partSize),
|
||||
DisableContentSha256: true,
|
||||
UserMetadata: meta,
|
||||
})
|
||||
return remoteVersionID(res.VersionID), m.ToObjectError(err, object)
|
||||
}
|
||||
|
||||
func (m *warmBackendMinIO) Put(ctx context.Context, object string, r io.Reader, length int64) (remoteVersionID, error) {
|
||||
return m.PutWithMeta(ctx, object, r, length, map[string]string{})
|
||||
}
|
||||
|
||||
func newWarmBackendMinIO(conf madmin.TierMinIO, tier string) (*warmBackendMinIO, error) {
|
||||
// Validation of credentials
|
||||
if conf.AccessKey == "" || conf.SecretKey == "" {
|
||||
|
||||
Reference in New Issue
Block a user