Skip to content

Commit

Permalink
catches errors as it should
Browse files Browse the repository at this point in the history
  • Loading branch information
vmogilev committed Jul 27, 2023
1 parent 65fa9e8 commit 5ea1fb4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions go/vt/mysqlctl/reparent.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,12 @@ TODO(alainjobart) Once refactoring is done, remove unused code paths.
*/

import (
"context"
"fmt"
"time"

"vitess.io/vitess/go/mysql"
"vitess.io/vitess/go/vt/log"

"context"
)

// CreateReparentJournal returns the commands to execute to create
Expand Down Expand Up @@ -76,6 +75,9 @@ func queryReparentJournal(timeCreatedNS int64) string {
func (mysqld *Mysqld) WaitForReparentJournal(ctx context.Context, timeCreatedNS int64) error {
for {
qr, err := mysqld.FetchSuperQuery(ctx, queryReparentJournal(timeCreatedNS))
if err != nil {
log.Infof("Error querying reparent journal: %v", err)
}
if err == nil && len(qr.Rows) == 1 {
// we have the row, we're done
return nil
Expand Down

0 comments on commit 5ea1fb4

Please sign in to comment.