Fix formatting
This commit is contained in:
parent
550488b020
commit
23edfd0d59
|
@ -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())
|
||||
|
@ -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());
|
||||
|
|
|
@ -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) {
|
||||
|
@ -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(
|
||||
|
|
|
@ -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(); }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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())) {}
|
||||
}
|
||||
}
|
||||
|
@ -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) {
|
||||
|
|
|
@ -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()) {
|
||||
|
@ -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();
|
||||
|
@ -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()) {
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -960,12 +960,8 @@ public:
|
|||
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) {
|
||||
|
@ -1024,12 +1020,8 @@ public:
|
|||
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
|
||||
|
|
Loading…
Reference in New Issue