Skip to content

Commit 22a8a84

Browse files
wangyeleiapecloud-bot
authored andcommitted
Revert "fix: restore shard cluster failed if the origin cluster's shards less than cluster's shards" (#10025)
(cherry picked from commit b222555)
1 parent e505606 commit 22a8a84

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

controllers/apps/cluster/transformer_cluster_restore.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
2020
package cluster
2121

2222
import (
23-
"fmt"
2423
"sort"
25-
"time"
2624

2725
"k8s.io/apimachinery/pkg/util/json"
2826
"sigs.k8s.io/controller-runtime/pkg/client"
@@ -76,10 +74,7 @@ func (c *clusterRestoreTransformer) Transform(ctx graph.TransformContext, dag *g
7674
if err != nil {
7775
return err
7876
}
79-
if int(spec.Shards) > len(backup.Status.Targets) && len(shardComponents) < int(spec.Shards) {
80-
return intctrlutil.NewRequeueError(time.Second,
81-
fmt.Sprintf(`the shard components of sharding "%s" are not ready, wait for next loop to allocate source targets`, spec.Name))
82-
}
77+
8378
targets := backup.Status.Targets
8479
// obtain components that have already been assigned targets.
8580
allocateTargetMap := map[string]string{}

0 commit comments

Comments
 (0)