Added retry loop for getReadVersion in IncrementalBackupWorkload
This commit is contained in:
parent
d3b57d9873
commit
eefaa30fa4
|
@ -70,8 +70,16 @@ struct IncrementalBackupWorkload : TestWorkload {
|
|||
ACTOR static Future<bool> _check(Database cx, IncrementalBackupWorkload* self) {
|
||||
state Reference<IBackupContainer> backupContainer;
|
||||
state UID backupUID;
|
||||
state Reference<ReadYourWritesTransaction> tr(new ReadYourWritesTransaction(cx));
|
||||
state Version v = wait(tr->getReadVersion());
|
||||
state Version v;
|
||||
state Transaction tr(cx);
|
||||
loop {
|
||||
try {
|
||||
wait(store(v, tr.getReadVersion()));
|
||||
break;
|
||||
} catch (Error& e) {
|
||||
wait(tr.onError(e));
|
||||
}
|
||||
}
|
||||
// Wait for backup container to be created and avoid race condition
|
||||
TraceEvent("IBackupWaitContainer");
|
||||
loop {
|
||||
|
|
Loading…
Reference in New Issue