Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add more information when held back by other task #872

Merged
merged 1 commit into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions cluster/srv_job.go
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ func (server *ServerMonitor) JobReseedPhysicalBackup(backtype string) error {
server.DelWaitPhysicalBackupCookie()

if server.HasAnyReseedingState() {
err := errors.New("Server is in reseeding state")
err := fmt.Errorf("Server is in reseeding state by %s", server.IsReseeding)
cluster.LogModulePrintf(cluster.Conf.Verbose, config.ConstLogModTask, config.LvlErr, err.Error())
return err
}
Expand Down Expand Up @@ -499,7 +499,7 @@ func (server *ServerMonitor) JobFlashbackPhysicalBackup() error {
server.DelWaitPhysicalBackupCookie()

if server.HasAnyReseedingState() {
return errors.New("Server is in reseeding state")
return fmt.Errorf("Server is in reseeding state by %s", server.IsReseeding)
}

task := "flashback" + cluster.Conf.BackupPhysicalType
Expand Down Expand Up @@ -602,7 +602,7 @@ func (server *ServerMonitor) JobReseedLogicalBackup(backtype string) error {
}

if server.HasAnyReseedingState() {
return fmt.Errorf("Server is in flashback state")
return fmt.Errorf("Server is in reseeding state by %s", server.IsReseeding)
}

server.SetInReseedBackup(backtype)
Expand Down Expand Up @@ -806,7 +806,7 @@ func (server *ServerMonitor) JobFlashbackLogicalBackup() error {
}

if server.HasAnyReseedingState() {
err := errors.New("Server is in reseeding state")
err := fmt.Errorf("Server is in reseeding state by %s", server.IsReseeding)
cluster.LogModulePrintf(cluster.Conf.Verbose, config.ConstLogModTask, config.LvlErr, err.Error())
return err
}
Expand Down Expand Up @@ -1254,7 +1254,7 @@ func (server *ServerMonitor) JobsCheckPending() error {

//Only cancel if not reseeding status
if server.HasAnyReseedingState() {
return nil
return fmt.Errorf("Server is in reseeding state by %s", server.IsReseeding)
}

Conn, err := server.GetNewDBConn()
Expand Down Expand Up @@ -2331,7 +2331,7 @@ func (server *ServerMonitor) JobBackupBinlog(binlogfile string, isPurge bool) er
return err
}
if server.HasAnyReseedingState() {
err = errors.New("Cancel job copy binlog during reseed")
err = fmt.Errorf("Server is in reseeding state by %s", server.IsReseeding)
cluster.LogModulePrintf(cluster.Conf.Verbose, config.ConstLogModPurge, config.LvlDbg, "%s", err.Error())
return err
}
Expand Down
2 changes: 1 addition & 1 deletion cluster/srv_rejoin.go
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ func (server *ServerMonitor) RejoinDirectDump() error {
var err3 error

if server.HasAnyReseedingState() {
return errors.New("Server is in reseeding state")
return fmt.Errorf("Server is in reseeding state by %s", server.IsReseeding)
}

tool := "direct"
Expand Down
2 changes: 1 addition & 1 deletion server/api_database.go
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ func (repman *ReplicationManager) handlerMuxServerReseed(w http.ResponseWriter,
if vars["backupMethod"] == "logicalmaster" {
err := node.RejoinDirectDump()
if err != nil {
mycluster.LogModulePrintf(mycluster.Conf.Verbose, config.ConstLogModGeneral, "ERROR", "mysqldump reseed restore failed %s", err)
mycluster.LogModulePrintf(mycluster.Conf.Verbose, config.ConstLogModGeneral, "ERROR", "direct reseed restore failed %s", err)
}
}
if vars["backupMethod"] == "physicalbackup" {
Expand Down