From c21d8830a2fe743f39c056533455877d598d2fd6 Mon Sep 17 00:00:00 2001 From: Junhyun Shim Date: Tue, 23 Aug 2022 19:12:57 +0200 Subject: [PATCH] Revert "Apply clang format" This reverts commit 11b8be6f3dac457186c511575e6bdfd5ebabd013. --- fdbclient/BlobGranuleFiles.cpp | 4 +--- fdbserver/BlobWorker.actor.cpp | 4 +--- fdbserver/DDRelocationQueue.actor.cpp | 8 ++------ fdbserver/DDShardTracker.actor.cpp | 8 ++------ fdbserver/GrvProxyServer.actor.cpp | 4 +--- flow/include/flow/ProtocolVersion.h | 8 ++------ 6 files changed, 9 insertions(+), 27 deletions(-) diff --git a/fdbclient/BlobGranuleFiles.cpp b/fdbclient/BlobGranuleFiles.cpp index 4d3f80093e..8ed6916622 100644 --- a/fdbclient/BlobGranuleFiles.cpp +++ b/fdbclient/BlobGranuleFiles.cpp @@ -2096,9 +2096,7 @@ struct KeyValueGen { return StringRef(ar, value); } - KeyRef randomUsedKey() const { - return usedKeysList[deterministicRandom()->randomInt(0, usedKeysList.size())]; - } + KeyRef randomUsedKey() const { return usedKeysList[deterministicRandom()->randomInt(0, usedKeysList.size())]; } KeyRange randomKeyRange() const { ASSERT(!usedKeysList.empty()); diff --git a/fdbserver/BlobWorker.actor.cpp b/fdbserver/BlobWorker.actor.cpp index 64d388f632..b77a217c55 100644 --- a/fdbserver/BlobWorker.actor.cpp +++ b/fdbserver/BlobWorker.actor.cpp @@ -1423,9 +1423,7 @@ ACTOR Future reevaluateInitialSplit(Reference bwData, // wait for manager stream to become ready, and send a message loop { choose { - when(wait(bwData->currentManagerStatusStream.get().onReady())) { - break; - } + when(wait(bwData->currentManagerStatusStream.get().onReady())) { break; } when(wait(bwData->currentManagerStatusStream.onChange())) {} } } diff --git a/fdbserver/DDRelocationQueue.actor.cpp b/fdbserver/DDRelocationQueue.actor.cpp index 3990b3b884..928cb4ec9e 100644 --- a/fdbserver/DDRelocationQueue.actor.cpp +++ b/fdbserver/DDRelocationQueue.actor.cpp @@ -2582,9 +2582,7 @@ ACTOR Future dataDistributionQueue(Database cx, debug_setCheckRelocationDuration(false); } } - when(KeyRange done = waitNext(rangesComplete.getFuture())) { - keysToLaunchFrom = done; - } + when(KeyRange done = waitNext(rangesComplete.getFuture())) { keysToLaunchFrom = done; } when(wait(recordMetrics)) { Promise req; getAverageShardBytes.send(req); @@ -2656,9 +2654,7 @@ TEST_CASE("/DataDistribution/DDQueue/ServerCounterTrace") { std::cout << "Start trace counter unit test for " << duration << "s ...\n"; loop choose { when(wait(counterFuture)) {} - when(wait(finishFuture)) { - break; - } + when(wait(finishFuture)) { break; } when(wait(delayJittered(2.0))) { std::vector team(3); for (int i = 0; i < team.size(); ++i) { diff --git a/fdbserver/DDShardTracker.actor.cpp b/fdbserver/DDShardTracker.actor.cpp index 7ef3ce66b4..9a95d87190 100644 --- a/fdbserver/DDShardTracker.actor.cpp +++ b/fdbserver/DDShardTracker.actor.cpp @@ -1023,9 +1023,7 @@ ACTOR Future fetchShardMetricsList_impl(DataDistributionTracker* self, Get ACTOR Future fetchShardMetricsList(DataDistributionTracker* self, GetMetricsListRequest req) { choose { when(wait(fetchShardMetricsList_impl(self, req))) {} - when(wait(delay(SERVER_KNOBS->DD_SHARD_METRICS_TIMEOUT))) { - req.reply.sendError(timed_out()); - } + when(wait(delay(SERVER_KNOBS->DD_SHARD_METRICS_TIMEOUT))) { req.reply.sendError(timed_out()); } } return Void(); } @@ -1061,9 +1059,7 @@ ACTOR Future dataDistributionTracker(Reference in initData = Reference(); loop choose { - when(Promise req = waitNext(getAverageShardBytes)) { - req.send(self.getAverageShardBytes()); - } + when(Promise req = waitNext(getAverageShardBytes)) { req.send(self.getAverageShardBytes()); } when(wait(loggingTrigger)) { TraceEvent("DDTrackerStats", self.distributorId) .detail("Shards", self.shards->size()) diff --git a/fdbserver/GrvProxyServer.actor.cpp b/fdbserver/GrvProxyServer.actor.cpp index 648cdd9fe3..a3b4aab647 100644 --- a/fdbserver/GrvProxyServer.actor.cpp +++ b/fdbserver/GrvProxyServer.actor.cpp @@ -423,9 +423,7 @@ ACTOR Future globalConfigRequestServer(GrvProxyData* grvProxyData, GrvProx Void()) && delay(SERVER_KNOBS->GLOBAL_CONFIG_REFRESH_INTERVAL); } - when(wait(actors.getResult())) { - ASSERT(false); - } + when(wait(actors.getResult())) { ASSERT(false); } } } } diff --git a/flow/include/flow/ProtocolVersion.h b/flow/include/flow/ProtocolVersion.h index 4b4c4299c5..f20749d8c1 100644 --- a/flow/include/flow/ProtocolVersion.h +++ b/flow/include/flow/ProtocolVersion.h @@ -50,12 +50,8 @@ constexpr uint64_t futureProtocolVersionValue = 0x0FDB00B073000000LL; struct x { \ static constexpr uint64_t protocolVersion = v; \ }; \ - constexpr bool has##x() const { \ - return this->version() >= x ::protocolVersion; \ - } \ - static constexpr ProtocolVersion with##x() { \ - return ProtocolVersion(x ::protocolVersion); \ - } + constexpr bool has##x() const { return this->version() >= x ::protocolVersion; } \ + static constexpr ProtocolVersion with##x() { return ProtocolVersion(x ::protocolVersion); } // ProtocolVersion wraps a uint64_t to make it type safe. It will know about the current versions. // The default constructor will initialize the version to 0 (which is an invalid