diff --git a/deps/3rd/jsoncpp b/deps/3rd/jsoncpp index 8190e061b..89e2973c7 160000 --- a/deps/3rd/jsoncpp +++ b/deps/3rd/jsoncpp @@ -1 +1 @@ -Subproject commit 8190e061bc2d95da37479a638aa2c9e483e58ec6 +Subproject commit 89e2973c754a9c02a49974d839779b151e95afd6 diff --git a/deps/3rd/libevent b/deps/3rd/libevent index 5df3037d1..112421c8f 160000 --- a/deps/3rd/libevent +++ b/deps/3rd/libevent @@ -1 +1 @@ -Subproject commit 5df3037d10556bfcb675bc73e516978b75fc7bc7 +Subproject commit 112421c8fa4840acd73502f2ab6a674fc025de37 diff --git a/src/observer/storage/buffer/disk_buffer_pool.h b/src/observer/storage/buffer/disk_buffer_pool.h index d41d1bd0c..070fbd6f1 100644 --- a/src/observer/storage/buffer/disk_buffer_pool.h +++ b/src/observer/storage/buffer/disk_buffer_pool.h @@ -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; }; @@ -352,5 +351,4 @@ class BufferPoolManager final common::Mutex lock_; unordered_map buffer_pools_; unordered_map id_to_buffer_pools_; - atomic next_buffer_pool_id_{1}; // 系统启动时,会打开所有的表,这样就可以知道当前系统最大的ID是多少了 -}; + atomic next_buffer_pool_id_{1}; // System startup opens all tables to know current max ID}; diff --git a/src/observer/storage/buffer/page.h b/src/observer/storage/buffer/page.h index cc7b02293..35f463625 100644 --- a/src/observer/storage/buffer/page.h +++ b/src/observer/storage/buffer/page.h @@ -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;