Skip to content

Commit 83f3c4b

Browse files
Masttfgithub-actions[bot]
authored andcommitted
style: format code with clang-format
1 parent f814b4a commit 83f3c4b

4 files changed

Lines changed: 5 additions & 8 deletions

File tree

src/index/ix_scan.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ void IxScan::next_key_position() {
5454
iid_.page_no = node->get_next_leaf();
5555
Page* next_page = bpm_->fetch_page({ih_->fd_, iid_.page_no});
5656
next_page->rlatch();
57-
unlatch(); // 释放当前页面
57+
unlatch(); // 释放当前页面
5858
now = next_page; // 更新当前页面为下一个叶节点
5959
}
6060
delete node; // 释放内存

src/index/ix_scan.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,7 @@ class IxScan : public RecScan {
6666
/**
6767
* @brief 析构函数,确保正确释放页面资源
6868
*/
69-
~IxScan() {
70-
unlatch();
71-
}
69+
~IxScan() { unlatch(); }
7270

7371
/**
7472
* @brief 移动到下一条记录

src/system/sm_manager.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -678,5 +678,4 @@ void SmManager::load_csv_data(const std::string& table_name, const std::string&
678678
// auto ih = ihs_.at(get_ix_manager()->get_index_name(tab_.name, index.cols)).get();
679679
// ih->debug_print_tree();
680680
// }
681-
682681
}

src/transaction/transaction_manager.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -525,14 +525,14 @@ void TransactionManager::add_delete_undo_log(Transaction* txn, const int& fd, Ri
525525
UpdateUndoLink(fd, rid, undo_link);
526526
}
527527

528-
std::pair<std::vector<UndoLog>, bool> TransactionManager::get_undologs_with_lock(int fd, Rid rid, Transaction *txn) {
528+
std::pair<std::vector<UndoLog>, bool> TransactionManager::get_undologs_with_lock(int fd, Rid rid, Transaction* txn) {
529529
std::shared_lock<std::shared_mutex> lock(version_info_mutex_);
530530
std::vector<UndoLog> undo_logs;
531531
auto pre_undo_link = GetUndoLink(fd, rid);
532-
532+
533533
// 现在磁盘的是不是被标记删除
534534
bool is_deleted = false;
535-
if(pre_undo_link.has_value()) {
535+
if (pre_undo_link.has_value()) {
536536
auto undo_log = GetUndoLog(pre_undo_link.value());
537537
is_deleted = undo_log.is_deleted_;
538538
}

0 commit comments

Comments
 (0)