You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: memiavl/README.md
+6-5Lines changed: 6 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,8 +11,8 @@
11
11
* Update metadata file format
12
12
* Encode key length with 4 bytes instead of 2.
13
13
* 24 Feb 2023:
14
-
* Reduce node size without hash) from 32bytes to 16bytes, leverage properties of post-order traversal.
15
-
* Merge key-values into single kvs file, build MPHF hash table to index it.
14
+
* Reduce node size without hash from 32bytes to 16bytes, leverage properties of post-order traversal.
15
+
* Merge key-values into single kvs file, build optional MPHF hash table to index it.
16
16
17
17
18
18
## The Journey
@@ -89,10 +89,11 @@ IAVL snapshot is composed by four files:
89
89
_padding : 3
90
90
version : 4
91
91
key offset : 8
92
+
hash : [32]byte
92
93
```
93
-
The node has fixed length, can be indexed directly. The nodes reference each other with the node index, nodes are written in post-order, so the root node is always placed at the end.
94
+
The node has fixed length, can be indexed directly. The nodes references each other with the node index, nodes are written with post-order depth-first traversal, so the root node is always placed at the end.
94
95
95
-
For branch node, the `key node` field reference the smallest leaf node in the right branch, the key slice is fetched from there indirectly, the leaf nodes will store key slice and value index informations, but the version field is stored in `keys` file instead.
96
+
For branch node, the `key node` field reference the smallest leaf node in the right branch, the key slice is fetched from there indirectly, the leaf nodes stores the `offset` into the `kvs` file, where the key and value slices can be built.
96
97
97
98
The branch node's left/child node indexes are inferenced from existing information and properties of post-order traversal:
98
99
@@ -115,7 +116,7 @@ IAVL snapshot is composed by four files:
115
116
*repeat*
116
117
```
117
118
118
-
-`kvs.index`, Minimal-perfect-hash-function build from `kvs`, support query as a hash map.
119
+
-`kvs.index`, optional MPHF(Minimal-Perfect-Hash-Function) hash index build from `kvs`, support query key-values as a hash map.
0 commit comments