diff --git a/fdbrpc/include/fdbrpc/LoadBalance.actor.h b/fdbrpc/include/fdbrpc/LoadBalance.actor.h index 3eb2133c21..2c5a0ae4f9 100644 --- a/fdbrpc/include/fdbrpc/LoadBalance.actor.h +++ b/fdbrpc/include/fdbrpc/LoadBalance.actor.h @@ -99,8 +99,7 @@ Future tssComparison(Req req, loop { choose { - when(ErrorOr _src = wait(fSource)) { - src = _src; + when(wait(store(src, fSource))) { srcEndTime = now(); fSource = Never(); finished++; @@ -108,8 +107,7 @@ Future tssComparison(Req req, break; } } - when(Optional> _tss = wait(fTssWithTimeout)) { - tss = _tss; + when(wait(store(tss, fTssWithTimeout))) { tssEndTime = now(); fTssWithTimeout = Never(); finished++; diff --git a/fdbserver/RocksDBCheckpointUtils.actor.cpp b/fdbserver/RocksDBCheckpointUtils.actor.cpp index bbd1fe94d0..1edd322490 100644 --- a/fdbserver/RocksDBCheckpointUtils.actor.cpp +++ b/fdbserver/RocksDBCheckpointUtils.actor.cpp @@ -542,8 +542,7 @@ ACTOR Future 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 _asyncFile = wait(IAsyncFileSystem::filesystem()->open(localFile, flags, 0666)); - asyncFile = std::move(_asyncFile); + wait(store(asyncFile, IAsyncFileSystem::filesystem()->open(localFile, flags, 0666))); state ReplyPromiseStream stream = ssi.fetchCheckpoint.getReplyStream(FetchCheckpointRequest(metaData->checkpointID, remoteFile)); diff --git a/fdbserver/workloads/PhysicalShardMove.actor.cpp b/fdbserver/workloads/PhysicalShardMove.actor.cpp index d26020b0f9..d97a4fccef 100644 --- a/fdbserver/workloads/PhysicalShardMove.actor.cpp +++ b/fdbserver/workloads/PhysicalShardMove.actor.cpp @@ -89,16 +89,14 @@ struct PhysicalShardMoveWorkLoad : TestWorkload { state std::unordered_set excludes; state std::unordered_set includes; state int teamSize = 1; - { - std::vector _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 _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()); diff --git a/fdbserver/workloads/StorageServerCheckpointRestoreTest.actor.cpp b/fdbserver/workloads/StorageServerCheckpointRestoreTest.actor.cpp index 691e929aaa..f3d6533f18 100644 --- a/fdbserver/workloads/StorageServerCheckpointRestoreTest.actor.cpp +++ b/fdbserver/workloads/StorageServerCheckpointRestoreTest.actor.cpp @@ -101,8 +101,7 @@ struct SSCheckpointRestoreWorkload : TestWorkload { loop { records.clear(); try { - std::vector _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));