Fixing change feed durableFetchVersion not getting updated

This commit is contained in:
Josh Slocum 2022-02-08 13:58:56 -06:00
parent 90a870962d
commit 6adf119e3d
1 changed files with 5 additions and 0 deletions

View File

@ -4274,10 +4274,15 @@ ACTOR Future<Version> fetchChangeFeedApplier(StorageServer* data,
remoteLoc++;
}
if (localVersion <= remoteVersion) {
// Do this once per wait instead of once per version for efficiency
data->fetchingChangeFeeds.insert(changeFeedInfo->id);
Standalone<MutationsAndVersionRef> _localResult = waitNext(localResults.getFuture());
localResult = _localResult;
}
}
// Do this once per wait instead of once per version for efficiency
data->fetchingChangeFeeds.insert(changeFeedInfo->id);
data->counters.feedBytesFetched += remoteResult.expectedSize();
data->fetchKeysBytesBudget -= remoteResult.expectedSize();
if (data->fetchKeysBytesBudget <= 0) {