Simplifying CF gap validation to ignore SS CF fetches

This commit is contained in:
Josh Slocum 2022-03-10 11:56:22 -06:00
parent 4b254d259c
commit d7367dad99
2 changed files with 11 additions and 3 deletions

View File

@ -2032,6 +2032,13 @@ ACTOR Future<std::pair<ChangeFeedStreamReply, bool>> getChangeFeedMutations(Stor
// gap validation
while (memoryVerifyIdx < memoryReply.mutations.size() &&
version > memoryReply.mutations[memoryVerifyIdx].version) {
if (req.canReadPopped) {
// There are weird cases where SS fetching mixed with SS durability and popping can mean there are
// gaps before the popped version temporarily
memoryVerifyIdx++;
continue;
}
// There is a case where this can happen - if we wait on a fetching change feed, and the feed is
// popped while we wait, we could have copied the memory mutations into memoryReply before the
// pop, but they may or may not have been skipped writing to disk

View File

@ -534,9 +534,10 @@ struct BlobGranuleVerifierWorkload : TestWorkload {
clients.push_back(timeout(findGranules(cx, this), testDuration, Void()));
for (int i = 0; i < threads; i++) {
clients.push_back(
timeout(reportErrors(verifyGranules(
cx, this, clientId == 0 && i == 0 && deterministicRandom()->random01() < 0.5),
"BlobGranuleVerifier"),
timeout(reportErrors(
verifyGranules(
cx, this, false /*clientId == 0 && i == 0 && deterministicRandom()->random01() < 0.5*/),
"BlobGranuleVerifier"),
testDuration,
Void()));
}