From 079b6c2b50bee05f4eab9b964b9cd292839df092 Mon Sep 17 00:00:00 2001 From: jiuker <2818723467@qq.com> Date: Wed, 8 Nov 2023 16:40:08 +0800 Subject: [PATCH] fix: add err when all bucket resync failed (#18401) --- cmd/site-replication.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/site-replication.go b/cmd/site-replication.go index bfae0be25..cdba1614a 100644 --- a/cmd/site-replication.go +++ b/cmd/site-replication.go @@ -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 }