Skip to content

Commit 2e2e752

Browse files
committed
fix: fix the wrong error return value
Signed-off-by: drawdrop <cricis@icloud.com>
1 parent 9a9726d commit 2e2e752

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mysqlcluster/syncer/status.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ func (s *StatusSyncer) AutoRebuild(ctx context.Context, pod *corev1.Pod, items [
360360
for _, other := range items {
361361
ord, err2 := utils.GetOrdinal(other.Name)
362362
if err2 != nil {
363-
return err
363+
return err2
364364

365365
}
366366
if ord == podNumber {
@@ -856,7 +856,7 @@ func (s *StatusSyncer) DoRoRebuild(ctx context.Context, pod *corev1.Pod, items [
856856
for _, other := range items {
857857
ord, err2 := utils.GetOrdinal(other.Name)
858858
if err2 != nil {
859-
return err
859+
return err2
860860

861861
}
862862
if ord == podNumber {

0 commit comments

Comments
 (0)