Fix healing on multiple zones (#8555)

It is expected in zone healing underlying
callers should return appropriate errors
This commit is contained in:
Harshavardhana
2019-11-21 13:18:32 -08:00
committed by GitHub
parent fd0fa4e5c5
commit fb43d64dc3
8 changed files with 120 additions and 63 deletions
+3 -2
View File
@@ -118,8 +118,8 @@ func (config *BucketObjectLockConfig) Get(bucketName string) (r Retention, ok bo
return r, ok
}
// Delete - delete retention configuration.
func (config *BucketObjectLockConfig) Delete(bucketName string) {
// Remove - removes retention configuration.
func (config *BucketObjectLockConfig) Remove(bucketName string) {
config.Lock()
delete(config.retentionMap, bucketName)
config.Unlock()
@@ -414,6 +414,7 @@ func checkGovernanceBypassAllowed(ctx context.Context, r *http.Request, bucket,
if err != nil {
// ignore case where object no longer exists
if toAPIError(ctx, err).Code == "NoSuchKey" {
oi.UserDefined = map[string]string{}
return oi, ErrNone
}
return oi, toAPIErrorCode(ctx, err)