Added retry loop for getReadVersion in IncrementalBackupWorkload

This commit is contained in:
sfc-gh-tclinkenbeard 2020-10-09 07:43:21 -07:00
parent d3b57d9873
commit eefaa30fa4
1 changed files with 10 additions and 2 deletions

View File

@ -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 {