fix: add err when all bucket resync failed (#18401)

This commit is contained in:
jiuker 2023-11-08 16:40:08 +08:00 committed by GitHub
parent 0924b34a17
commit 079b6c2b50
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -5239,6 +5239,9 @@ func (c *SiteReplicationSys) startResync(ctx context.Context, objAPI ObjectLayer
if len(res.Buckets) > 0 {
res.ErrDetail = "partial failure in starting site resync"
}
if len(buckets) != 0 && len(res.Buckets) == len(buckets) {
return res, fmt.Errorf("all buckets resync failed")
}
return res, nil
}