FastRestore:Short cut DB for get and clearange

This commit is contained in:
Meng Xu 2020-07-30 11:17:05 -07:00
parent ad915e462e
commit d71361245b
1 changed files with 11 additions and 0 deletions

View File

@ -238,6 +238,17 @@ ACTOR static Future<Void> getAndComputeStagingKeys(
.detail("GetKeys", incompleteStagingKeys.size())
.detail("DelayTime", delayTime);
if (SERVER_KNOBS->FASTRESTORE_NOT_WRITE_DB) { // Get dummy value to short-circut DB
int i = 0;
for (auto& key : incompleteStagingKeys) {
MutationRef m(MutationRef::SetValue, key.first, LiteralStringRef("0"));
key.second->second.add(m, LogMessageVersion(1));
key.second->second.precomputeResult("GetAndComputeStagingKeys", applierID, batchIndex);
i++;
}
return Void();
}
loop {
try {
int i = 0;