Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-mpilman committed Oct 5, 2022
1 parent 550488b commit 23edfd0
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 46 deletions.
8 changes: 2 additions & 6 deletions fdbclient/ManagementAPI.actor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1010,9 +1010,7 @@ ACTOR Future<Optional<CoordinatorsResult>> changeQuorumChecker(Transaction* tr,

choose {
when(wait(waitForAll(leaderServers))) {}
when(wait(delay(5.0))) {
return CoordinatorsResult::COORDINATOR_UNREACHABLE;
}
when(wait(delay(5.0))) { return CoordinatorsResult::COORDINATOR_UNREACHABLE; }
}
TraceEvent("ChangeQuorumCheckerSetCoordinatorsKey")
.detail("CurrentCoordinators", old.toString())
Expand Down Expand Up @@ -1114,9 +1112,7 @@ ACTOR Future<CoordinatorsResult> changeQuorum(Database cx, Reference<IQuorumChan
TaskPriority::CoordinationReply));
choose {
when(wait(waitForAll(leaderServers))) {}
when(wait(delay(5.0))) {
return CoordinatorsResult::COORDINATOR_UNREACHABLE;
}
when(wait(delay(5.0))) { return CoordinatorsResult::COORDINATOR_UNREACHABLE; }
}

tr.set(coordinatorsKey, newClusterConnectionString.toString());
Expand Down
8 changes: 2 additions & 6 deletions fdbclient/S3BlobStore.actor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -486,9 +486,7 @@ ACTOR Future<Void> deleteRecursively_impl(Reference<S3BlobStoreEndpoint> b,
loop {
choose {
// Throw if done throws, otherwise don't stop until end_of_stream
when(wait(done)) {
done = Never();
}
when(wait(done)) { done = Never(); }

when(S3BlobStoreEndpoint::ListResult list = waitNext(resultStream.getFuture())) {
for (auto& object : list.objects) {
Expand Down Expand Up @@ -1204,9 +1202,7 @@ ACTOR Future<S3BlobStoreEndpoint::ListResult> listObjects_impl(Reference<S3BlobS
loop {
choose {
// Throw if done throws, otherwise don't stop until end_of_stream
when(wait(done)) {
done = Never();
}
when(wait(done)) { done = Never(); }

when(S3BlobStoreEndpoint::ListResult info = waitNext(resultStream.getFuture())) {
results.commonPrefixes.insert(
Expand Down
4 changes: 1 addition & 3 deletions fdbclient/SpecialKeySpace.actor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -304,9 +304,7 @@ ACTOR Future<RangeResult> SpecialKeySpace::checkRYWValid(SpecialKeySpace* sks,
wait(SpecialKeySpace::getRangeAggregationActor(sks, ryw, begin, end, limits, reverse))) {
return result;
}
when(wait(ryw->resetFuture())) {
throw internal_error();
}
when(wait(ryw->resetFuture())) { throw internal_error(); }
}
}

Expand Down
2 changes: 1 addition & 1 deletion fdbrpc/FlowTests.actor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ struct Int {
serializer(ar, value);
}
};
} // namespace
} // namespace flow_tests_details

TEST_CASE("/flow/flow/nonserializable futures") {
// Types no longer need to be statically serializable to make futures, promises, actors
Expand Down
8 changes: 2 additions & 6 deletions fdbserver/Resolver.actor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -242,9 +242,7 @@ ACTOR Future<Void> resolveBatch(Reference<Resolver> self,
}

choose {
when(wait(self->version.whenAtLeast(req.prevVersion))) {
break;
}
when(wait(self->version.whenAtLeast(req.prevVersion))) { break; }
when(wait(self->checkNeededVersion.onTrigger())) {}
}
}
Expand Down Expand Up @@ -728,9 +726,7 @@ ACTOR Future<Void> resolver(ResolverInterface resolver,
try {
state Future<Void> core = resolverCore(resolver, initReq, db);
loop choose {
when(wait(core)) {
return Void();
}
when(wait(core)) { return Void(); }
when(wait(checkRemoved(db, initReq.recoveryCount, resolver))) {}
}
} catch (Error& e) {
Expand Down
12 changes: 3 additions & 9 deletions fdbserver/include/fdbserver/WorkerInterface.actor.h
Original file line number Diff line number Diff line change
Expand Up @@ -1241,9 +1241,7 @@ Future<T> ioTimeoutError(Future<T> what, double time) {
}
Future<Void> end = lowPriorityDelay(time);
choose {
when(T t = wait(what)) {
return t;
}
when(T t = wait(what)) { return t; }
when(wait(end)) {
Error err = io_timeout();
if (g_network->isSimulated() && !g_simulator->getCurrentProcess()->isReliable()) {
Expand Down Expand Up @@ -1271,9 +1269,7 @@ Future<T> ioDegradedOrTimeoutError(Future<T> what,
if (degradedTime < errTime) {
Future<Void> degradedEnd = lowPriorityDelay(degradedTime);
choose {
when(T t = wait(what)) {
return t;
}
when(T t = wait(what)) { return t; }
when(wait(degradedEnd)) {
CODE_PROBE(true, "TLog degraded", probe::func::deduplicate);
TraceEvent(SevWarnAlways, "IoDegraded").log();
Expand All @@ -1284,9 +1280,7 @@ Future<T> ioDegradedOrTimeoutError(Future<T> what,

Future<Void> end = lowPriorityDelay(errTime - degradedTime);
choose {
when(T t = wait(what)) {
return t;
}
when(T t = wait(what)) { return t; }
when(wait(end)) {
Error err = io_timeout();
if (g_network->isSimulated() && !g_simulator->getCurrentProcess()->isReliable()) {
Expand Down
4 changes: 1 addition & 3 deletions fdbserver/tester.actor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2096,9 +2096,7 @@ ACTOR Future<Void> runTests(Reference<IClusterConnectionRecord> connRecord,
}

choose {
when(wait(tests)) {
return Void();
}
when(wait(tests)) { return Void(); }
when(wait(quorum(actors, 1))) {
ASSERT(false);
throw internal_error();
Expand Down
16 changes: 4 additions & 12 deletions flow/Net2.actor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -960,12 +960,8 @@ class SSLConnection final : public IConnection, ReferenceCounted<SSLConnection>
doAcceptHandshake(self, connected);
try {
choose {
when(wait(connected.getFuture())) {
return Void();
}
when(wait(delay(FLOW_KNOBS->CONNECTION_MONITOR_TIMEOUT))) {
throw connection_failed();
}
when(wait(connected.getFuture())) { return Void(); }
when(wait(delay(FLOW_KNOBS->CONNECTION_MONITOR_TIMEOUT))) { throw connection_failed(); }
}
} catch (Error& e) {
if (e.code() != error_code_actor_cancelled) {
Expand Down Expand Up @@ -1024,12 +1020,8 @@ class SSLConnection final : public IConnection, ReferenceCounted<SSLConnection>
doConnectHandshake(self, connected);
try {
choose {
when(wait(connected.getFuture())) {
return Void();
}
when(wait(delay(FLOW_KNOBS->CONNECTION_MONITOR_TIMEOUT))) {
throw connection_failed();
}
when(wait(connected.getFuture())) { return Void(); }
when(wait(delay(FLOW_KNOBS->CONNECTION_MONITOR_TIMEOUT))) { throw connection_failed(); }
}
} catch (Error& e) {
// Either the connection failed, or was cancelled by the caller
Expand Down

0 comments on commit 23edfd0

Please sign in to comment.