Skip to content

Commit

Permalink
dm/pkg/retry: modify ReplicationErrMsgs and add relevant unit test (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
docsir authored Nov 16, 2021
1 parent 3c35455 commit 8311703
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions dm/dm/worker/task_checker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,7 @@ func (s *testTaskCheckerSuite) TestIsResumableError(c *check.C) {
{nil, true},
{errors.New("unknown error"), true},
{terror.ErrNotSet.Delegate(&tmysql.SQLError{Code: 1236, Message: "Could not find first log file name in binary log index file", State: tmysql.DefaultMySQLState}), false},
{terror.ErrNotSet.Delegate(&tmysql.SQLError{Code: 1236, Message: "The slave is connecting using CHANGE MASTER TO MASTER_AUTO_POSITION = 1, but the master has purged binary logs containing GTIDs that the slave requires", State: tmysql.DefaultMySQLState}), false},
}

for _, tc := range testCases {
Expand Down
1 change: 1 addition & 0 deletions dm/pkg/retry/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ var (
// ReplicationErrMsgs list the error message of un-recoverable replication error.
ReplicationErrMsgs = []string{
"Could not find first log file name in binary log index file",
"The slave is connecting using CHANGE MASTER TO MASTER_AUTO_POSITION = 1, but the master has purged binary logs containing GTIDs that the slave requires",
}

// ParseRelayLogErrMsgs list the error messages of some un-recoverable relay log parsing error, which is used in task auto recovery.
Expand Down

0 comments on commit 8311703

Please sign in to comment.