Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 1fd5ab3

Browse files
committedDec 31, 2024·
Revert code format changes
1 parent aa32e55 commit 1fd5ab3

File tree

6 files changed

+197
-197
lines changed

6 files changed

+197
-197
lines changed
 

‎db/column_family.cc

+12-13
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,8 @@ Status CheckCFPathsSupported(const DBOptions& db_options,
196196
return Status::NotSupported(
197197
"More than one CF paths are only supported in "
198198
"universal and level compaction styles. ");
199-
} else if (cf_options.cf_paths.empty() && db_options.db_paths.size() > 1) {
199+
} else if (cf_options.cf_paths.empty() &&
200+
db_options.db_paths.size() > 1) {
200201
return Status::NotSupported(
201202
"More than one DB paths are only supported in "
202203
"universal and level compaction styles. ");
@@ -342,8 +343,7 @@ ColumnFamilyOptions SanitizeOptions(const ImmutableDBOptions& db_options,
342343
// were not deleted yet, when we open the DB we will find these .trash files
343344
// and schedule them to be deleted (or delete immediately if SstFileManager
344345
// was not used)
345-
auto sfm =
346-
static_cast<SstFileManagerImpl*>(db_options.sst_file_manager.get());
346+
auto sfm = static_cast<SstFileManagerImpl*>(db_options.sst_file_manager.get());
347347
for (size_t i = 0; i < result.cf_paths.size(); i++) {
348348
DeleteScheduler::CleanupDirectory(db_options.env, sfm,
349349
result.cf_paths[i].path)
@@ -596,8 +596,8 @@ ColumnFamilyData::ColumnFamilyData(
596596
compaction_picker_.reset(
597597
new FIFOCompactionPicker(ioptions_, &internal_comparator_));
598598
} else if (ioptions_.compaction_style == kCompactionStyleNone) {
599-
compaction_picker_.reset(
600-
new NullCompactionPicker(ioptions_, &internal_comparator_));
599+
compaction_picker_.reset(new NullCompactionPicker(
600+
ioptions_, &internal_comparator_));
601601
ROCKS_LOG_WARN(ioptions_.logger,
602602
"Column family %s does not use any background compaction. "
603603
"Compactions can only be done via CompactFiles\n",
@@ -985,8 +985,7 @@ WriteStallCondition ColumnFamilyData::RecalculateWriteStallConditions(
985985
mutable_cf_options.hard_pending_compaction_bytes_limit > 0 &&
986986
(compaction_needed_bytes -
987987
mutable_cf_options.soft_pending_compaction_bytes_limit) >
988-
3 *
989-
(mutable_cf_options.hard_pending_compaction_bytes_limit -
988+
3 * (mutable_cf_options.hard_pending_compaction_bytes_limit -
990989
mutable_cf_options.soft_pending_compaction_bytes_limit) /
991990
4;
992991

@@ -1394,8 +1393,8 @@ bool ColumnFamilyData::ReturnThreadLocalSuperVersion(SuperVersion* sv) {
13941393
return false;
13951394
}
13961395

1397-
void ColumnFamilyData::InstallSuperVersion(SuperVersionContext* sv_context,
1398-
InstrumentedMutex* db_mutex) {
1396+
void ColumnFamilyData::InstallSuperVersion(
1397+
SuperVersionContext* sv_context, InstrumentedMutex* db_mutex) {
13991398
db_mutex->AssertHeld();
14001399
return InstallSuperVersion(sv_context, mutable_cf_options_);
14011400
}
@@ -1561,8 +1560,8 @@ Env::WriteLifeTimeHint ColumnFamilyData::CalculateSSTWriteHint(int level) {
15611560
// than base_level.
15621561
return Env::WLTH_MEDIUM;
15631562
}
1564-
return static_cast<Env::WriteLifeTimeHint>(
1565-
level - base_level + static_cast<int>(Env::WLTH_MEDIUM));
1563+
return static_cast<Env::WriteLifeTimeHint>(level - base_level +
1564+
static_cast<int>(Env::WLTH_MEDIUM));
15661565
}
15671566

15681567
Status ColumnFamilyData::AddDirectories(
@@ -1656,8 +1655,8 @@ ColumnFamilyData* ColumnFamilySet::GetColumnFamily(uint32_t id) const {
16561655
}
16571656
}
16581657

1659-
ColumnFamilyData* ColumnFamilySet::GetColumnFamily(
1660-
const std::string& name) const {
1658+
ColumnFamilyData* ColumnFamilySet::GetColumnFamily(const std::string& name)
1659+
const {
16611660
auto cfd_iter = column_families_.find(name);
16621661
if (cfd_iter != column_families_.end()) {
16631662
auto cfd = GetColumnFamily(cfd_iter->second);

‎db/db_impl/db_impl.cc

+8-6
Original file line numberDiff line numberDiff line change
@@ -1263,7 +1263,7 @@ Status DBImpl::SetDBOptions(
12631263
file_options_for_compaction_ = fs_->OptimizeForCompactionTableWrite(
12641264
file_options_for_compaction_, immutable_db_options_);
12651265
versions_->ChangeFileOptions(mutable_db_options_);
1266-
// TODO(xiez): clarify why apply optimize for read to write options
1266+
//TODO(xiez): clarify why apply optimize for read to write options
12671267
file_options_for_compaction_ = fs_->OptimizeForCompactionTableRead(
12681268
file_options_for_compaction_, immutable_db_options_);
12691269
file_options_for_compaction_.compaction_readahead_size =
@@ -1728,7 +1728,7 @@ InternalIterator* DBImpl::NewInternalIterator(const ReadOptions& read_options,
17281728
IterState* cleanup =
17291729
new IterState(this, &mutex_, super_version,
17301730
read_options.background_purge_on_iterator_cleanup ||
1731-
immutable_db_options_.avoid_unnecessary_blocking_io);
1731+
immutable_db_options_.avoid_unnecessary_blocking_io);
17321732
internal_iter->RegisterCleanup(CleanupIteratorState, cleanup, nullptr);
17331733

17341734
return internal_iter;
@@ -2100,8 +2100,8 @@ std::vector<Status> DBImpl::MultiGet(
21002100
std::string* timestamp = timestamps ? &(*timestamps)[keys_read] : nullptr;
21012101

21022102
LookupKey lkey(keys[keys_read], consistent_seqnum, read_options.timestamp);
2103-
auto cfh = static_cast_with_check<ColumnFamilyHandleImpl>(
2104-
column_family[keys_read]);
2103+
auto cfh =
2104+
static_cast_with_check<ColumnFamilyHandleImpl>(column_family[keys_read]);
21052105
SequenceNumber max_covering_tombstone_seq = 0;
21062106
auto mgd_iter = multiget_cf_data.find(cfh->cfd()->GetID());
21072107
assert(mgd_iter != multiget_cf_data.end());
@@ -3511,7 +3511,8 @@ SuperVersion* DBImpl::GetAndRefSuperVersion(uint32_t column_family_id) {
35113511
void DBImpl::CleanupSuperVersion(SuperVersion* sv) {
35123512
// Release SuperVersion
35133513
if (sv->Unref()) {
3514-
bool defer_purge = immutable_db_options().avoid_unnecessary_blocking_io;
3514+
bool defer_purge =
3515+
immutable_db_options().avoid_unnecessary_blocking_io;
35153516
{
35163517
InstrumentedMutexLock l(&mutex_);
35173518
sv->Cleanup();
@@ -5156,7 +5157,8 @@ Status DBImpl::VerifyChecksumInternal(const ReadOptions& read_options,
51565157
}
51575158
}
51585159

5159-
bool defer_purge = immutable_db_options().avoid_unnecessary_blocking_io;
5160+
bool defer_purge =
5161+
immutable_db_options().avoid_unnecessary_blocking_io;
51605162
{
51615163
InstrumentedMutexLock l(&mutex_);
51625164
for (auto sv : sv_list) {

‎db/db_impl/db_impl.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,8 @@ class DBImpl : public DB {
419419
virtual Status GetSortedWalFiles(VectorLogPtr& files) override;
420420
virtual Status GetCurrentWalFile(
421421
std::unique_ptr<LogFile>* current_log_file) override;
422-
virtual Status GetCreationTimeOfOldestFile(uint64_t* creation_time) override;
422+
virtual Status GetCreationTimeOfOldestFile(
423+
uint64_t* creation_time) override;
423424

424425
virtual Status GetUpdatesSince(
425426
SequenceNumber seq_number, std::unique_ptr<TransactionLogIterator>* iter,

‎db/db_test2.cc

+167-170
Large diffs are not rendered by default.

‎db/snapshot_impl.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class SnapshotImpl : public Snapshot {
3838
SnapshotImpl* prev_;
3939
SnapshotImpl* next_;
4040

41-
SnapshotList* list_; // just for sanity checks
41+
SnapshotList* list_; // just for sanity checks
4242

4343
int64_t unix_time_;
4444

@@ -51,7 +51,7 @@ class SnapshotList {
5151
SnapshotList() {
5252
list_.prev_ = &list_;
5353
list_.next_ = &list_;
54-
list_.number_ = 0xFFFFFFFFL; // placeholder marker, for debugging
54+
list_.number_ = 0xFFFFFFFFL; // placeholder marker, for debugging
5555
// Set all the variables to make UBSAN happy.
5656
list_.list_ = nullptr;
5757
list_.unix_time_ = 0;

‎utilities/blob_db/blob_db_impl.cc

+6-5
Original file line numberDiff line numberDiff line change
@@ -1024,8 +1024,9 @@ Status BlobDBImpl::Put(const WriteOptions& options, const Slice& key,
10241024
return PutUntil(options, key, value, kNoExpiration);
10251025
}
10261026

1027-
Status BlobDBImpl::PutWithTTL(const WriteOptions& options, const Slice& key,
1028-
const Slice& value, uint64_t ttl) {
1027+
Status BlobDBImpl::PutWithTTL(const WriteOptions& options,
1028+
const Slice& key, const Slice& value,
1029+
uint64_t ttl) {
10291030
uint64_t now = EpochNow();
10301031
uint64_t expiration = kNoExpiration - now > ttl ? now + ttl : kNoExpiration;
10311032
return PutUntil(options, key, value, expiration);
@@ -1385,9 +1386,9 @@ Status BlobDBImpl::AppendBlob(const std::shared_ptr<BlobFile>& bfile,
13851386
return s;
13861387
}
13871388

1388-
std::vector<Status> BlobDBImpl::MultiGet(const ReadOptions& read_options,
1389-
const std::vector<Slice>& keys,
1390-
std::vector<std::string>* values) {
1389+
std::vector<Status> BlobDBImpl::MultiGet(
1390+
const ReadOptions& read_options,
1391+
const std::vector<Slice>& keys, std::vector<std::string>* values) {
13911392
StopWatch multiget_sw(clock_, statistics_, BLOB_DB_MULTIGET_MICROS);
13921393
RecordTick(statistics_, BLOB_DB_NUM_MULTIGET);
13931394
// Get a snapshot to avoid blob file get deleted between we

0 commit comments

Comments
 (0)
Please sign in to comment.