ready to actually write bpt
This commit is contained in:
@ -87,8 +87,10 @@ class BPlusTreeIndexer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
page_id_t root_page_id; // stored in the first 4 (0-3) 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
|
||||||
uint64_t siz; // stored in the next 8 (4-11) bytes of RawDatMemory
|
// 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;
|
static KeyComparator key_cmp;
|
||||||
std::shared_mutex latch;
|
std::shared_mutex latch;
|
||||||
BufferPoolManager *bpm;
|
BufferPoolManager *bpm;
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
#pragma pack(push, 1)
|
#pragma pack(push, 1)
|
||||||
template <typename KeyType, size_t kPageSize = 4096>
|
template <typename KeyType, size_t kPageSize = 4096>
|
||||||
class BPlusTreePage {
|
class BPlusTreePage {
|
||||||
typedef std::pair<KeyType, b_plus_tree_value_index_t> value_type;
|
typedef std::pair<KeyType, default_numeric_index_t> value_type;
|
||||||
page_id_t p_n;
|
page_id_t p_n;
|
||||||
page_id_t p_parent;
|
page_id_t p_parent;
|
||||||
uint8_t is_leaf;
|
uint8_t is_leaf;
|
||||||
|
@ -5,7 +5,6 @@
|
|||||||
extern const size_t kPageSize;
|
extern const size_t kPageSize;
|
||||||
typedef uint32_t default_numeric_index_t;
|
typedef uint32_t default_numeric_index_t;
|
||||||
typedef default_numeric_index_t page_id_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 frame_id_t;
|
||||||
typedef default_numeric_index_t b_plus_tree_value_index_t;
|
typedef default_numeric_index_t b_plus_tree_value_index_t;
|
||||||
extern const b_plus_tree_value_index_t kInvalidValueIndex;
|
extern const b_plus_tree_value_index_t kInvalidValueIndex;
|
||||||
|
Reference in New Issue
Block a user