From 0e54f1ed31c3be93732c2adfef41e7b45b8b80bc Mon Sep 17 00:00:00 2001 From: Jingyu Zhou Date: Thu, 16 Apr 2020 20:47:05 -0700 Subject: [PATCH] Fix a test failure minRestorableVersion may be decided by snapshot version and is larger than contiguousLogEnd version. --- .../workloads/BackupAndParallelRestoreCorrectness.actor.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fdbserver/workloads/BackupAndParallelRestoreCorrectness.actor.cpp b/fdbserver/workloads/BackupAndParallelRestoreCorrectness.actor.cpp index 987a394cbb..55a235b86c 100644 --- a/fdbserver/workloads/BackupAndParallelRestoreCorrectness.actor.cpp +++ b/fdbserver/workloads/BackupAndParallelRestoreCorrectness.actor.cpp @@ -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