FastRestore:Transform keys when DB is locked

This commit is contained in:
Meng Xu 2020-06-18 17:51:47 -07:00
parent 8d59568dc7
commit a59044150f
1 changed files with 6 additions and 0 deletions

View File

@ -335,6 +335,8 @@ struct BackupAndParallelRestoreCorrectnessWorkload : TestWorkload {
ACTOR static Future<Void> transformDatabaseContents(Database cx, Key addPrefix, Key removePrefix) {
state ReadYourWritesTransaction tr(cx);
tr.setOption(FDBTransactionOptions::ACCESS_SYSTEM_KEYS);
tr.setOption(FDBTransactionOptions::LOCK_AWARE);
TraceEvent("FastRestoreWorkloadTransformDatabaseContents")
.detail("AddPrefix", addPrefix)
@ -351,6 +353,10 @@ struct BackupAndParallelRestoreCorrectnessWorkload : TestWorkload {
wait(writeKVs(cx, newKVs, 0, newKVs.size()));
TraceEvent("FastRestoreWorkloadTransformDatabaseContentsFinish")
.detail("AddPrefix", addPrefix)
.detail("RemovePrefix", removePrefix);
return Void();
}