fix: if a DR cluster has a much lower version than the primary database, it would take a long time to process the empty versions. But the version of the DR cluster before starting the DR to avoid this problem.
This commit is contained in:
parent
224621be04
commit
77d100e1e6
|
@ -1426,19 +1426,6 @@ public:
|
|||
|
||||
TraceEvent("DBA_switchover_stopped");
|
||||
|
||||
try {
|
||||
Void _ = wait( drAgent.submitBackup(backupAgent->taskBucket->src, tagName, backupRanges, false, addPrefix, removePrefix, true, true) );
|
||||
} catch( Error &e ) {
|
||||
if( e.code() != error_code_backup_duplicate )
|
||||
throw;
|
||||
}
|
||||
|
||||
TraceEvent("DBA_switchover_submitted");
|
||||
|
||||
int _ = wait( drAgent.waitSubmitted(backupAgent->taskBucket->src, tagName) );
|
||||
|
||||
TraceEvent("DBA_switchover_started");
|
||||
|
||||
state ReadYourWritesTransaction tr3(dest);
|
||||
loop {
|
||||
try {
|
||||
|
@ -1460,6 +1447,19 @@ public:
|
|||
|
||||
TraceEvent("DBA_switchover_version_upgraded");
|
||||
|
||||
try {
|
||||
Void _ = wait( drAgent.submitBackup(backupAgent->taskBucket->src, tagName, backupRanges, false, addPrefix, removePrefix, true, true) );
|
||||
} catch( Error &e ) {
|
||||
if( e.code() != error_code_backup_duplicate )
|
||||
throw;
|
||||
}
|
||||
|
||||
TraceEvent("DBA_switchover_submitted");
|
||||
|
||||
int _ = wait( drAgent.waitSubmitted(backupAgent->taskBucket->src, tagName) );
|
||||
|
||||
TraceEvent("DBA_switchover_started");
|
||||
|
||||
Void _ = wait( backupAgent->unlockBackup(dest, tagName) );
|
||||
|
||||
TraceEvent("DBA_switchover_unlocked");
|
||||
|
|
Loading…
Reference in New Issue