Skip to content

Commit 09b654d

Browse files
Apply clang-format to inline buggify changes
1 parent c15b88f commit 09b654d

13 files changed

Lines changed: 33 additions & 37 deletions

File tree

fdbclient/DatabaseContext.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -759,7 +759,7 @@ static Future<Void> clientStatusUpdateActor(DatabaseContext* cx) {
759759
// Commit the chunks splitting into different transactions if needed
760760
int64_t dataSizeLimit =
761761
buggify() ? deterministicRandom()->randomInt(200e3, 1.5 * CLIENT_KNOBS->TRANSACTION_SIZE_LIMIT)
762-
: 0.8 * CLIENT_KNOBS->TRANSACTION_SIZE_LIMIT;
762+
: 0.8 * CLIENT_KNOBS->TRANSACTION_SIZE_LIMIT;
763763
auto tracking_iter = trChunksQ.begin();
764764
ASSERT(commitQ.empty() && (txBytes == 0));
765765
while (true) {

fdbclient/FileBackupAgent.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2402,8 +2402,8 @@ struct BackupRangeTaskFunc : BackupTaskFuncBase {
24022402
outVersion = values.second;
24032403
// block size must be at least large enough for 3 max size keys and 2 max size values + overhead so
24042404
// 250k conservatively.
2405-
int blockSize =
2406-
buggify() ? deterministicRandom()->randomInt(250e3, 4e6) : CLIENT_KNOBS->BACKUP_RANGEFILE_BLOCK_SIZE;
2405+
int blockSize = buggify() ? deterministicRandom()->randomInt(250e3, 4e6)
2406+
: CLIENT_KNOBS->BACKUP_RANGEFILE_BLOCK_SIZE;
24072407
Version snapshotBeginVersion{ 0 };
24082408
int64_t snapshotRangeFileCount{ 0 };
24092409

@@ -2897,7 +2897,7 @@ struct BackupSnapshotDispatchTask : BackupTaskFuncBase {
28972897

28982898
// Limit number of tasks added per transaction
28992899
int taskBatchSize = buggify() ? deterministicRandom()->randomInt(1, countShardsToDispatch + 1)
2900-
: CLIENT_KNOBS->BACKUP_DISPATCH_ADDTASK_SIZE;
2900+
: CLIENT_KNOBS->BACKUP_DISPATCH_ADDTASK_SIZE;
29012901
int added = 0;
29022902

29032903
while (countShardsToDispatch > 0 && added < taskBatchSize && shardMap.size() > 0) {

fdbclient/ReadYourWrites.actor.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1007,7 +1007,8 @@ class RYWImpl {
10071007
int singleClears = 0;
10081008
int clearLimit = requestCount ? 1 << std::min(requestCount, 20) : 0;
10091009
if (it.beginKey() > itEnd.beginKey())
1010-
singleClears = std::min(skipUncachedBack(ucEnd, itEnd, buggify() ? 0 : clearLimit + 100), clearLimit);
1010+
singleClears =
1011+
std::min(skipUncachedBack(ucEnd, itEnd, buggify() ? 0 : clearLimit + 100), clearLimit);
10111012

10121013
KeySelector read_begin;
10131014
if (ucEnd != itEnd) {

fdbrpc/AsyncFileCached.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ Future<Reference<IAsyncFile>> AsyncFileCached::open_impl(std::string filename, i
5757
if (g_network->isSimulated()) {
5858
auto cacheItr = simulatorPageCaches.find(g_network->getLocalAddress());
5959
if (cacheItr == simulatorPageCaches.end()) {
60-
int64_t pageCacheSize4k = (buggify()) ? FLOW_KNOBS->BUGGIFY_SIM_PAGE_CACHE_4K : FLOW_KNOBS->SIM_PAGE_CACHE_4K;
60+
int64_t pageCacheSize4k =
61+
(buggify()) ? FLOW_KNOBS->BUGGIFY_SIM_PAGE_CACHE_4K : FLOW_KNOBS->SIM_PAGE_CACHE_4K;
6162
int64_t pageCacheSize64k =
6263
(buggify()) ? FLOW_KNOBS->BUGGIFY_SIM_PAGE_CACHE_64K : FLOW_KNOBS->SIM_PAGE_CACHE_64K;
6364
auto caches = std::make_pair(makeReference<EvictablePageCache>(4096, pageCacheSize4k),

fdbrpc/include/fdbrpc/fdbrpc.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -840,8 +840,7 @@ class RequestStream {
840840
Future<Void> disc =
841841
makeDependent<T>(IFailureMonitor::failureMonitor()).onDisconnectOrFailure(getEndpoint());
842842
auto& p = getReplyPromiseStream(value);
843-
if (disc.isReady() ||
844-
(g_network->isSimulated() && !g_simulator->speedUpSimulation && buggify(0.01))) {
843+
if (disc.isReady() || (g_network->isSimulated() && !g_simulator->speedUpSimulation && buggify(0.01))) {
845844
if (disc.isReady() && IFailureMonitor::failureMonitor().knownUnauthorized(getEndpoint())) {
846845
p.sendError(unauthorized_attempt());
847846
} else {

fdbserver/clustercontroller/ClusterRecovery.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1315,10 +1315,11 @@ Future<Void> sendInitialCommitToResolvers(Reference<ClusterRecoveryData> self) {
13151315
if (data.empty())
13161316
break;
13171317
((KeyRangeRef&)txnKeys) = KeyRangeRef(keyAfter(data.back().key, txnKeys.arena()), txnKeys.end);
1318-
RangeResult nextData =
1319-
self->txnStateStore
1320-
->readRange(txnKeys, buggify() ? 3 : SERVER_KNOBS->DESIRED_TOTAL_BYTES, SERVER_KNOBS->DESIRED_TOTAL_BYTES)
1321-
.get();
1318+
RangeResult nextData = self->txnStateStore
1319+
->readRange(txnKeys,
1320+
buggify() ? 3 : SERVER_KNOBS->DESIRED_TOTAL_BYTES,
1321+
SERVER_KNOBS->DESIRED_TOTAL_BYTES)
1322+
.get();
13221323

13231324
TxnStateRequest req;
13241325
req.arena = data.arena();

fdbserver/datadistributor/DDShardTracker.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1137,8 +1137,7 @@ Future<Void> fetchTopKShardMetrics_impl(DataDistributionTracker* self, GetTopKMe
11371137

11381138
Future<Void> fetchTopKShardMetrics(DataDistributionTracker* self, GetTopKMetricsRequest req) {
11391139
// simulate time_out
1140-
Future<Void> f =
1141-
g_network->isSimulated() && buggify(0.01) ? Never() : fetchTopKShardMetrics_impl(self, req);
1140+
Future<Void> f = g_network->isSimulated() && buggify(0.01) ? Never() : fetchTopKShardMetrics_impl(self, req);
11421141
if (auto const res = co_await timeout(f, SERVER_KNOBS->DD_SHARD_METRICS_TIMEOUT); !res.present()) {
11431142
CODE_PROBE(true, "TopK DD_SHARD_METRICS_TIMEOUT");
11441143
req.reply.send(GetTopKMetricsReply());

fdbserver/kvstore/DiskQueue.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -773,8 +773,7 @@ class RawDiskQueue_TwoFiles : public Tracked<RawDiskQueue_TwoFiles> {
773773

774774
// Read up to 1MB into readingBuffer
775775
int len = std::min<int64_t>((files[readingFile].size / sizeof(Page) - readingPage) * sizeof(Page),
776-
buggify(1.0) ? sizeof(Page) * deterministicRandom()->randomInt(1, 4)
777-
: (1 << 20));
776+
buggify(1.0) ? sizeof(Page) * deterministicRandom()->randomInt(1, 4) : (1 << 20));
778777
readingBuffer.clear();
779778
readingBuffer.alignReserve(sizeof(Page), len);
780779
void* p = readingBuffer.append(len);

fdbserver/kvstore/VersionedBTree.actor.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3404,7 +3404,7 @@ class DWALPager final : public IPager2 {
34043404

34053405
// Maximum number of remaining remap entries to keep before obeying stop command.
34063406
double toleranceRatio = buggify() ? deterministicRandom()->randomInt(0, 10) / 100.0
3407-
: SERVER_KNOBS->REDWOOD_REMAP_CLEANUP_TOLERANCE_RATIO;
3407+
: SERVER_KNOBS->REDWOOD_REMAP_CLEANUP_TOLERANCE_RATIO;
34083408
// For simplicity, we assume each entry in the remap queue corresponds to one remapped page.
34093409
uint64_t remapCleanupWindowEntries =
34103410
static_cast<uint64_t>(self->remapCleanupWindowBytes / self->header.pageSize);
@@ -7601,16 +7601,16 @@ class KeyValueStoreRedwood : public IKeyValueStore {
76017601
pageCacheBytes =
76027602
g_network->isSimulated()
76037603
? (buggify() ? deterministicRandom()->randomInt(pageSize, FLOW_KNOBS->BUGGIFY_SIM_PAGE_CACHE_4K)
7604-
: FLOW_KNOBS->SIM_PAGE_CACHE_4K)
7604+
: FLOW_KNOBS->SIM_PAGE_CACHE_4K)
76057605
: FLOW_KNOBS->PAGE_CACHE_4K;
76067606
}
76077607
// Rough size of pages to keep in remap cleanup queue before being cleanup.
76087608
int64_t remapCleanupWindowBytes =
76097609
g_network->isSimulated()
76107610
? (buggify() ? (deterministicRandom()->coinflip()
7611-
? deterministicRandom()->randomInt64(0, 100 * 1024) // small window
7612-
: deterministicRandom()->randomInt64(0, 100 * 1024 * 1024)) // large window
7613-
: 100 * 1024 * 1024) // 100M
7611+
? deterministicRandom()->randomInt64(0, 100 * 1024) // small window
7612+
: deterministicRandom()->randomInt64(0, 100 * 1024 * 1024)) // large window
7613+
: 100 * 1024 * 1024) // 100M
76147614
: SERVER_KNOBS->REDWOOD_REMAP_CLEANUP_WINDOW_BYTES;
76157615

76167616
IPager2* pager = new DWALPager(pageSize,
@@ -9786,8 +9786,8 @@ TEST_CASE("Lredwood/correctness/btree") {
97869786
params.getDouble("advanceOldVersionProbability").orDefault(deterministicRandom()->random01());
97879787
state int64_t pageCacheBytes =
97889788
params.getInt("pageCacheBytes")
9789-
.orDefault(pagerMemoryOnly ? 2e9
9790-
: (pageSize * deterministicRandom()->randomInt(1, (buggify() ? 10 : 10000) + 1)));
9789+
.orDefault(
9790+
pagerMemoryOnly ? 2e9 : (pageSize * deterministicRandom()->randomInt(1, (buggify() ? 10 : 10000) + 1)));
97919791
state Version versionIncrement =
97929792
params.getInt("versionIncrement").orDefault(deterministicRandom()->randomInt64(1, 1e8));
97939793
state int64_t remapCleanupWindowBytes =

fdbserver/tlog/TLogServer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1403,7 +1403,7 @@ Future<Void> tLogPop(TLogData* self, TLogPopRequest req, Reference<LogData> logD
14031403

14041404
double getTLogStorageUpdateDelayDuration() {
14051405
return buggify() ? SERVER_KNOBS->BUGGIFY_TLOG_STORAGE_MIN_UPDATE_INTERVAL
1406-
: SERVER_KNOBS->TLOG_STORAGE_MIN_UPDATE_INTERVAL;
1406+
: SERVER_KNOBS->TLOG_STORAGE_MIN_UPDATE_INTERVAL;
14071407
}
14081408

14091409
// This function (and updatePersistentData, which is called by this function) run at a low priority and can soak up all

0 commit comments

Comments
 (0)