Skip to content

Commit

Permalink
Add load to check existing task
Browse files Browse the repository at this point in the history
  • Loading branch information
caffeinated92 committed Jun 26, 2024
1 parent 37835f7 commit 810487f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cluster/srv_job.go
Original file line number Diff line number Diff line change
Expand Up @@ -299,8 +299,10 @@ func (server *ServerMonitor) JobFlashbackLogicalBackup() (int64, error) {
server.createCookie("cookie_waitbackup")
return 0, errors.New("No Logical Backup")
}
var jobid int64
jobid, err = server.JobInsertTaks(task, server.SSTPort, cluster.Conf.MonitorAddress)
if v, ok := server.ActiveTasks.Load(task); ok {
dt = v.(DBTask)
}
jobid, err := server.JobInsertTaks(task, server.SSTPort, cluster.Conf.MonitorAddress)
if err != nil {
cluster.LogModulePrintf(cluster.Conf.Verbose, config.ConstLogModGeneral, config.LvlErr, "Receive flashback logical backup %s request for server: %s %s", cluster.Conf.BackupLogicalType, server.URL, err)
return jobid, err
Expand Down

0 comments on commit 810487f

Please sign in to comment.