Address review comments

This commit is contained in:
Markus Pilman 2022-10-05 09:30:25 -06:00
parent 0361cf74e5
commit 45a31884d5
4 changed files with 21 additions and 30 deletions

View File

@ -99,8 +99,7 @@ Future<Void> tssComparison(Req req,
loop {
choose {
when(ErrorOr<Resp> _src = wait(fSource)) {
src = _src;
when(wait(store(src, fSource))) {
srcEndTime = now();
fSource = Never();
finished++;
@ -108,8 +107,7 @@ Future<Void> tssComparison(Req req,
break;
}
}
when(Optional<ErrorOr<Resp>> _tss = wait(fTssWithTimeout)) {
tss = _tss;
when(wait(store(tss, fTssWithTimeout))) {
tssEndTime = now();
fTssWithTimeout = Never();
finished++;

View File

@ -542,8 +542,7 @@ ACTOR Future<Void> fetchCheckpointFile(Database cx,
wait(IAsyncFileSystem::filesystem()->deleteFile(localFile, true));
const int64_t flags = IAsyncFile::OPEN_ATOMIC_WRITE_AND_CREATE | IAsyncFile::OPEN_READWRITE |
IAsyncFile::OPEN_CREATE | IAsyncFile::OPEN_UNCACHED | IAsyncFile::OPEN_NO_AIO;
Reference<IAsyncFile> _asyncFile = wait(IAsyncFileSystem::filesystem()->open(localFile, flags, 0666));
asyncFile = std::move(_asyncFile);
wait(store(asyncFile, IAsyncFileSystem::filesystem()->open(localFile, flags, 0666)));
state ReplyPromiseStream<FetchCheckpointReply> stream =
ssi.fetchCheckpoint.getReplyStream(FetchCheckpointRequest(metaData->checkpointID, remoteFile));

View File

@ -89,16 +89,14 @@ struct PhysicalShardMoveWorkLoad : TestWorkload {
state std::unordered_set<UID> excludes;
state std::unordered_set<UID> includes;
state int teamSize = 1;
{
std::vector<UID> _teamA = wait(self->moveShard(self,
cx,
deterministicRandom()->randomUniqueID(),
KeyRangeRef("TestKeyA"_sr, "TestKeyF"_sr),
teamSize,
includes,
excludes));
teamA = std::move(_teamA);
}
wait(store(teamA,
self->moveShard(self,
cx,
deterministicRandom()->randomUniqueID(),
KeyRangeRef("TestKeyA"_sr, "TestKeyF"_sr),
teamSize,
includes,
excludes)));
excludes.insert(teamA.begin(), teamA.end());
state uint64_t sh0 = deterministicRandom()->randomUInt64();
@ -106,16 +104,14 @@ struct PhysicalShardMoveWorkLoad : TestWorkload {
state uint64_t sh2 = deterministicRandom()->randomUInt64();
// Move range [TestKeyA, TestKeyB) to sh0.
{
std::vector<UID> _teamA = wait(self->moveShard(self,
cx,
UID(sh0, deterministicRandom()->randomUInt64()),
KeyRangeRef("TestKeyA"_sr, "TestKeyB"_sr),
teamSize,
includes,
excludes));
teamA = std::move(_teamA);
}
wait(store(teamA,
self->moveShard(self,
cx,
UID(sh0, deterministicRandom()->randomUInt64()),
KeyRangeRef("TestKeyA"_sr, "TestKeyB"_sr),
teamSize,
includes,
excludes)));
// Move range [TestKeyB, TestKeyC) to sh1, on the same server.
includes.insert(teamA.begin(), teamA.end());

View File

@ -101,8 +101,7 @@ struct SSCheckpointRestoreWorkload : TestWorkload {
loop {
records.clear();
try {
std::vector<CheckpointMetaData> _records = wait(getCheckpointMetaData(cx, testRange, version, format));
records = std::move(_records);
wait(store(records, getCheckpointMetaData(cx, testRange, version, format)));
break;
} catch (Error& e) {
TraceEvent("TestFetchCheckpointMetadataError")
@ -167,8 +166,7 @@ struct SSCheckpointRestoreWorkload : TestWorkload {
loop {
try {
tr.setOption(FDBTransactionOptions::LOCK_AWARE);
RangeResult _res = wait(tr.getRange(KeyRangeRef(key, endKey), CLIENT_KNOBS->TOO_MANY));
res = std::move(_res);
wait(store(res, tr.getRange(KeyRangeRef(key, endKey), CLIENT_KNOBS->TOO_MANY)));
break;
} catch (Error& e) {
wait(tr.onError(e));