Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion deps/3rd/jsoncpp
2 changes: 1 addition & 1 deletion deps/3rd/libevent
Submodule libevent updated 203 files
4 changes: 1 addition & 3 deletions src/observer/storage/buffer/disk_buffer_pool.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ struct BPFileHeader
*/
static const int MAX_PAGE_NUM =
(BP_PAGE_DATA_SIZE - sizeof(buffer_pool_id) - sizeof(page_count) - sizeof(allocated_pages)) * 8;

string to_string() const;
};

Expand Down Expand Up @@ -352,5 +351,4 @@ class BufferPoolManager final
common::Mutex lock_;
unordered_map<string, DiskBufferPool *> buffer_pools_;
unordered_map<int32_t, DiskBufferPool *> id_to_buffer_pools_;
atomic<int32_t> next_buffer_pool_id_{1}; // 系统启动时,会打开所有的表,这样就可以知道当前系统最大的ID是多少了
};
atomic<int32_t> next_buffer_pool_id_{1}; // System startup opens all tables to know current max ID};
13 changes: 6 additions & 7 deletions src/observer/storage/buffer/page.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,12 @@ static constexpr PageNum BP_INVALID_PAGE_NUM = -1;

static constexpr PageNum BP_HEADER_PAGE = 0;

static constexpr const int BP_PAGE_SIZE = (1 << 13);
static constexpr const int BP_PAGE_DATA_SIZE = (BP_PAGE_SIZE - sizeof(LSN) - sizeof(CheckSum));

/**
* @brief 表示一个页面,可能放在内存或磁盘上
* @ingroup BufferPool
*/
static constexpr const int BP_PAGE_SIZE = (1 << 13);
static constexpr const int BP_PAGE_DATA_SIZE =
(BP_PAGE_SIZE - sizeof(LSN) - sizeof(CheckSum)); /**
* @brief 表示一个页面,可能放在内存或磁盘上
* @ingroup BufferPool
*/
struct Page
{
LSN lsn;
Expand Down
Loading