Fix for gotAll in getChangeFeedMutations
This commit is contained in:
parent
bf6ed8348f
commit
bc7b76b407
|
@ -7389,12 +7389,22 @@ ACTOR Future<Void> partialChangeFeedStream(StorageServerInterface interf,
|
|||
} else {
|
||||
// TODO REMOVE eventually, useful for debugging for now
|
||||
if (!rep.mutations[resultLoc].mutations.empty()) {
|
||||
fmt::print("non-empty mutations ({0}), but versions out of order from {1}! mv={2}, "
|
||||
"nv={3}\n",
|
||||
fmt::print("non-empty mutations ({0}), but versions out of order from {1} for {2} cf "
|
||||
"{3}! mv={4}, nv={5}\n",
|
||||
rep.mutations.size(),
|
||||
interf.id().toString().substr(0, 4),
|
||||
idx,
|
||||
feedData->id.toString().substr(0, 6),
|
||||
rep.mutations[resultLoc].version,
|
||||
nextVersion);
|
||||
for (auto& it : rep.mutations[resultLoc].mutations) {
|
||||
if (it.type == MutationRef::SetValue) {
|
||||
printf(" %s=", it.param1.printable().c_str());
|
||||
} else {
|
||||
printf(
|
||||
" %s - %s", it.param1.printable().c_str(), it.param2.printable().c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
ASSERT(rep.mutations[resultLoc].mutations.empty());
|
||||
}
|
||||
|
|
|
@ -1901,8 +1901,10 @@ ACTOR Future<std::pair<ChangeFeedStreamReply, bool>> getChangeFeedMutations(Stor
|
|||
}
|
||||
reply.mutations.push_back(
|
||||
reply.arena, MutationsAndVersionRef(finalVersion, finalVersion == dequeVersion ? dequeKnownCommit : 0));
|
||||
// if we add empty mutation, we gotAll
|
||||
gotAll = true;
|
||||
// if we add empty mutation after the last thing in memory, and didn't read from disk, gotAll is true
|
||||
if (data->version.get() == startVersion) {
|
||||
gotAll = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (MUTATION_TRACKING_ENABLED) {
|
||||
|
|
Loading…
Reference in New Issue