fix: do not duplicate lastEpochEnd from different servers

This commit is contained in:
Evan Tschannen 2021-10-24 19:17:11 -07:00
parent 4039dbd8da
commit 0e327d3d0a
1 changed files with 5 additions and 2 deletions

View File

@ -6747,8 +6747,11 @@ ACTOR Future<Void> mergeChangeFeedStream(std::vector<std::pair<StorageServerInte
checkVersion = nextStream.next.version;
}
if (nextOut.size() && nextStream.next.version == nextOut.back().version) {
nextOut.back().mutations.append_deep(
nextOut.arena(), nextStream.next.mutations.begin(), nextStream.next.mutations.size());
if (nextStream.next.mutations.size() &&
nextStream.next.mutations.front().param1 != lastEpochEndPrivateKey) {
nextOut.back().mutations.append_deep(
nextOut.arena(), nextStream.next.mutations.begin(), nextStream.next.mutations.size());
}
} else {
nextOut.push_back_deep(nextOut.arena(), nextStream.next);
}