Fix a test failure

minRestorableVersion may be decided by snapshot version and is larger than
contiguousLogEnd version.
This commit is contained in:
Jingyu Zhou 2020-04-16 20:47:05 -07:00
parent 0938e45c6a
commit 0e54f1ed31
1 changed files with 2 additions and 1 deletions

View File

@ -450,7 +450,8 @@ struct BackupAndParallelRestoreCorrectnessWorkload : TestWorkload {
targetVersion = desc.minRestorableVersion.get();
} else if (deterministicRandom()->random01() < 0.1) {
targetVersion = desc.maxRestorableVersion.get();
} else if (deterministicRandom()->random01() < 0.5) {
} else if (deterministicRandom()->random01() < 0.5 &&
desc.minRestorableVersion.get() < desc.contiguousLogEnd.get()) {
// The assertion may fail because minRestorableVersion may be decided by snapshot version.
// ASSERT_WE_THINK(desc.minRestorableVersion.get() <= desc.contiguousLogEnd.get());
// This assertion can fail when contiguousLogEnd < maxRestorableVersion and