Skip to content

Commit

Permalink
logs
Browse files Browse the repository at this point in the history
  • Loading branch information
hnwyllmm committed Nov 13, 2024
1 parent e6ba846 commit 8b4ffd4
Show file tree
Hide file tree
Showing 6 changed files with 325 additions and 6 deletions.
317 changes: 317 additions & 0 deletions 1.log

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ IF(WITH_UNIT_TESTS)
ENDIF (ENABLE_COVERAGE)
enable_testing()
ENDIF(WITH_UNIT_TESTS)

message(STATUS "CMAKE_COMMON_FLAGS is " ${CMAKE_COMMON_FLAGS})
SET(CMAKE_CXX_FLAGS ${CMAKE_COMMON_FLAGS})
SET(CMAKE_C_FLAGS ${CMAKE_COMMON_FLAGS})

Expand Down
2 changes: 1 addition & 1 deletion deps/common/log/log.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ int LoggerFactory::init_default(

return init(log_file, &g_log, log_level, console_level, rotate_type);
}

#define LBT_SYMBOLS
const char *lbt()
{
constexpr int buffer_size = 100;
Expand Down
8 changes: 5 additions & 3 deletions src/observer/storage/buffer/disk_buffer_pool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ Frame *BPFrameManager::get_internal(const FrameId &frame_id)
(void)frames_.get(frame_id, frame);
if (frame != nullptr) {
frame->pin();
LOG_DEBUG("got a frame. frame=%s", frame->to_string().c_str());
}
return frame;
}
Expand All @@ -138,6 +139,7 @@ Frame *BPFrameManager::alloc(int buffer_pool_id, PageNum page_num)
frame->set_page_num(page_num);
frame->pin();
frames_.put(frame_id, frame);
LOG_DEBUG("allocate a new frame. frame=%s", frame->to_string().c_str());
}
return frame;
}
Expand Down Expand Up @@ -372,7 +374,7 @@ RC DiskBufferPool::allocate_page(Frame **frame)

hdr_frame_->set_lsn(lsn);

LOG_INFO("allocate a new page without extend buffer pool. page num=%d, buffer pool=%d", i, id());
LOG_DEBUG("allocate a new page without extend buffer pool. page num=%d, buffer pool=%d", i, id());
lock_.unlock();
return get_this_page(i, frame);
}
Expand Down Expand Up @@ -402,8 +404,8 @@ RC DiskBufferPool::allocate_page(Frame **frame)
return rc;
}

LOG_INFO("allocate new page by extending bufferpool. file=%s, pageNum=%d, pin=%d",
file_name_.c_str(), page_num, allocated_frame->pin_count());
LOG_INFO("allocate new page by extending bufferpool. buffer_pool_id=%d, pageNum=%d, pin=%d",
id(), page_num, allocated_frame->pin_count());

file_header_->allocated_pages++;
file_header_->page_count++;
Expand Down
2 changes: 1 addition & 1 deletion src/observer/storage/buffer/frame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,6 @@ string Frame::to_string() const
{
stringstream ss;
ss << "frame id:" << frame_id().to_string() << ", dirty=" << dirty() << ", pin=" << pin_count()
<< ", lsn=" << lsn() << ", this=" << this;
<< ", lsn=" << lsn();
return ss.str();
}
Binary file added src/observer/storage/index/.bplus_tree.h.swp
Binary file not shown.

0 comments on commit 8b4ffd4

Please sign in to comment.