diff --git a/bpt/include/bpt/bpt.hpp b/bpt/include/bpt/bpt.hpp index 642b203..6eb67b0 100644 --- a/bpt/include/bpt/bpt.hpp +++ b/bpt/include/bpt/bpt.hpp @@ -87,8 +87,10 @@ class BPlusTreeIndexer { } private: - page_id_t root_page_id; // stored in the first 4 (0-3) bytes of RawDatMemory - uint64_t siz; // stored in the next 8 (4-11) bytes of RawDatMemory + page_id_t root_page_id; // stored in the first 4 (0-3) bytes of RawDatMemory, this directly operates on the buf + // maintained by DiskManager, BufferPoolManager only passes the pointer to it + uint64_t siz; // stored in the next 8 (4-11) bytes of RawDatMemory, this directly operates on the buf + // maintained by DiskManager, BufferPoolManager only passes the pointer to it static KeyComparator key_cmp; std::shared_mutex latch; BufferPoolManager *bpm; diff --git a/bpt/include/bpt/bpt_page.hpp b/bpt/include/bpt/bpt_page.hpp index 9c2e906..e5fb462 100644 --- a/bpt/include/bpt/bpt_page.hpp +++ b/bpt/include/bpt/bpt_page.hpp @@ -5,7 +5,7 @@ #pragma pack(push, 1) template class BPlusTreePage { - typedef std::pair value_type; + typedef std::pair value_type; page_id_t p_n; page_id_t p_parent; uint8_t is_leaf; diff --git a/bpt/include/bpt/config.h b/bpt/include/bpt/config.h index 3eec52d..20c1a76 100644 --- a/bpt/include/bpt/config.h +++ b/bpt/include/bpt/config.h @@ -5,7 +5,6 @@ extern const size_t kPageSize; typedef uint32_t default_numeric_index_t; typedef default_numeric_index_t page_id_t; -typedef default_numeric_index_t block_id_t; typedef default_numeric_index_t frame_id_t; typedef default_numeric_index_t b_plus_tree_value_index_t; extern const b_plus_tree_value_index_t kInvalidValueIndex;