Added assert to more easily detect WFV errors
This commit is contained in:
parent
86f6f73518
commit
46ac726700
|
@ -121,6 +121,9 @@ struct GranuleMetadata : NonCopyable, ReferenceCounted<GranuleMetadata> {
|
||||||
|
|
||||||
AssignBlobRangeRequest originalReq;
|
AssignBlobRangeRequest originalReq;
|
||||||
|
|
||||||
|
// TODO FOR DEBUGGING, REMOVE
|
||||||
|
Version waitForVersionReturned = invalidVersion;
|
||||||
|
|
||||||
void resume() {
|
void resume() {
|
||||||
if (resumeSnapshot.canBeSet()) {
|
if (resumeSnapshot.canBeSet()) {
|
||||||
resumeSnapshot.send(Void());
|
resumeSnapshot.send(Void());
|
||||||
|
@ -1329,6 +1332,18 @@ ACTOR Future<Void> blobGranuleUpdateFiles(Reference<BlobWorkerData> bwData,
|
||||||
} else {
|
} else {
|
||||||
ASSERT(mutations.front().version >= startState.changeFeedStartVersion);
|
ASSERT(mutations.front().version >= startState.changeFeedStartVersion);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// if we just got mutations, we haven't buffered them yet, so waitForVersion can't have returned
|
||||||
|
// this version yet
|
||||||
|
if (mutations.front().version <= metadata->waitForVersionReturned) {
|
||||||
|
fmt::print("ERROR: WaitForVersion returned early for granule [{0} - {1}). "
|
||||||
|
"waitForVersionReturned={2}, mutationVersion={3} !!!\n",
|
||||||
|
metadata->keyRange.begin.printable(),
|
||||||
|
metadata->keyRange.end.printable(),
|
||||||
|
metadata->waitForVersionReturned,
|
||||||
|
mutations.front().version);
|
||||||
|
}
|
||||||
|
ASSERT(mutations.front().version > metadata->waitForVersionReturned);
|
||||||
}
|
}
|
||||||
when(wait(inFlightFiles.empty() ? Never() : success(inFlightFiles.front().future))) {
|
when(wait(inFlightFiles.empty() ? Never() : success(inFlightFiles.front().future))) {
|
||||||
// TODO REMOVE
|
// TODO REMOVE
|
||||||
|
@ -1949,6 +1964,11 @@ ACTOR Future<Void> waitForVersion(Reference<GranuleMetadata> metadata, Version v
|
||||||
fmt::print("{0}) done\n", v);
|
fmt::print("{0}) done\n", v);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO REMOVE debugging
|
||||||
|
if (v > metadata->waitForVersionReturned) {
|
||||||
|
metadata->waitForVersionReturned = v;
|
||||||
|
}
|
||||||
|
|
||||||
return Void();
|
return Void();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue