Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -748,6 +748,8 @@ public boolean handleDirMoveTask(DirMoveTask task, TFinishTaskRequest request) {
}

public void replayAddJob(AbstractJob job) {
LOG.info("replay backup/restore job: {}", job);

if (job.isCancelled()) {
AbstractJob existingJob = getCurrentJob(job.getDbId());
if (existingJob == null || existingJob.isDone()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -355,14 +355,15 @@ class Syncer {
}
String checkSQL = "SHOW BACKUP FROM ${dbName}"
def records = suite.sql(checkSQL)
def allDone = true
for (row in records) {
logger.info("BACKUP row is ${row}")
String state = (row[3] as String);
if (state != "FINISHED" && state != "CANCELLED") {
return false
allDone = false
}
}
true
allDone
}

void waitSnapshotFinish(String dbName = null) {
Expand Down Expand Up @@ -404,14 +405,15 @@ class Syncer {
}
String checkSQL = "SHOW RESTORE FROM ${dbName}"
def records = suite.sql(checkSQL)
def allDone = true
for (row in records) {
logger.info("Restore row is ${row}")
String state = row[4]
if (state != "FINISHED" && state != "CANCELLED") {
return false
allDone = false
}
}
true
allDone
}

void waitAllRestoreFinish(String dbName = null) {
Expand Down