format code

This commit is contained in:
Xiaoxi Wang 2022-10-14 13:02:21 -07:00
parent 5743dff0ca
commit e8e6f47e09
3 changed files with 13 additions and 14 deletions

View File

@ -756,13 +756,13 @@ ACTOR static Future<MoveKeysBatchInfo> startMoveKeysTransaction(Database occ,
}
ACTOR static Future<Void> startMoveKeys(Database occ,
KeyRange keys,
std::vector<UID> servers,
MoveKeysLock lock,
FlowLock* startMoveKeysLock,
UID relocationIntervalId,
std::map<UID, StorageServerInterface>* tssMapping,
const DDEnabledState* ddEnabledState) {
KeyRange keys,
std::vector<UID> servers,
MoveKeysLock lock,
FlowLock* startMoveKeysLock,
UID relocationIntervalId,
std::map<UID, StorageServerInterface>* tssMapping,
const DDEnabledState* ddEnabledState) {
state TraceInterval interval("RelocateShard_StartMoveKeys");
state Future<Void> warningLogger = logWarningAfter("StartMoveKeysTooLong", 600, servers);
@ -1234,7 +1234,6 @@ ACTOR static Future<Void> finishMoveKeys(Database occ,
state Future<Void> warningLogger = logWarningAfter("FinishMoveKeysTooLong", 600, destinationTeam);
state Key begin = keys.begin;
ASSERT(!destinationTeam.empty());
try {
@ -2528,8 +2527,8 @@ Future<Void> rawStartMovement(Database occ, MoveKeysParams& params, std::map<UID
}
Future<Void> rawFinishMovement(Database occ,
MoveKeysParams& params,
const std::map<UID, StorageServerInterface>& tssMapping) {
MoveKeysParams& params,
const std::map<UID, StorageServerInterface>& tssMapping) {
if (SERVER_KNOBS->SHARD_ENCODE_LOCATION_METADATA) {
return finishMoveShards(std::move(occ),
params.dataMoveId,

View File

@ -45,7 +45,7 @@ double DeterministicRandom::random01() {
}
int DeterministicRandom::randomInt(int min, int maxPlusOne) {
ASSERT_LT(min , maxPlusOne);
ASSERT_LT(min, maxPlusOne);
unsigned int range;
if (maxPlusOne < 0)
range = std::abs(maxPlusOne - min);
@ -65,7 +65,7 @@ int DeterministicRandom::randomInt(int min, int maxPlusOne) {
}
int64_t DeterministicRandom::randomInt64(int64_t min, int64_t maxPlusOne) {
ASSERT_LT(min , maxPlusOne);
ASSERT_LT(min, maxPlusOne);
uint64_t range;
if (maxPlusOne < 0)
range = std::abs(maxPlusOne - min);
@ -93,7 +93,7 @@ uint64_t DeterministicRandom::randomUInt64() {
}
uint32_t DeterministicRandom::randomSkewedUInt32(uint32_t min, uint32_t maxPlusOne) {
ASSERT_LT(min , maxPlusOne);
ASSERT_LT(min, maxPlusOne);
std::uniform_real_distribution<double> distribution(std::log(std::max<double>(min, 1.0 / M_E)),
std::log(maxPlusOne));
double exponent = distribution(random);