Merge pull request #3911 from ajbeamon/fix-versionstamp-read-version-error-check

Add error checking for a getReadVersion call in Versionstamp workloads
This commit is contained in:
Jingyu Zhou 2020-10-15 11:04:25 -07:00 committed by GitHub
commit 4ebc4fbf16
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 1 deletions

View File

@ -162,7 +162,17 @@ struct VersionStampWorkload : TestWorkload {
state ReadYourWritesTransaction tr(cx);
// We specifically wish to grab the smalles read version that we can get and maintain it, to
// have the strictest check we can on versionstamps monotonically increasing.
state Version readVersion = wait(tr.getReadVersion());
state Version readVersion;
loop {
try {
Version _readVersion = wait(tr.getReadVersion());
readVersion = _readVersion;
break;
}
catch(Error &e) {
wait(tr.onError(e));
}
}
if(BUGGIFY) {
if(deterministicRandom()->random01() < 0.5) {