Skip to content

Commit

Permalink
retry.Retryable(): re-try MySQL error 1047 for a "not yet prepared node"
Browse files Browse the repository at this point in the history
During start a Galera cluster complains with "WSREP has not yet prepared
node for application use". But the error code, 1047, stands for "Unknown
command". So re-try only a "not yet prepared node", but not an "Unknown
command".
  • Loading branch information
Al2Klimov committed Feb 16, 2024
1 parent 0e9810c commit 85954dd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/retry/retry.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ func Retryable(err error) bool {
// 1213: Deadlock found when trying to get lock
// 2006: MySQL server has gone away
return true
case 1047: // Unknown command
return strings.Contains(e.Message, "not yet prepared node for application use")
default:
return false
}
Expand Down

0 comments on commit 85954dd

Please sign in to comment.