Skip to content

Commit b5e06ca

Browse files
committed
Minor reorg to design doc
1 parent b2bb144 commit b5e06ca

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

docs/DESIGN.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ with up to fan_out children.
160160
Once a node becomes full, it is written to the end of the compression block as a
161161
series of fan_out DataCoordinates. The now-persistent full node's DataCoordinate
162162
is added to its parent. If the node was the root, then a new parent node is
163-
created and this DataCoordinate is added to the new parent.
163+
created and the full node's DataCoordinate is added to the new parent.
164164

165165
As a result, there is only ever one node, RightmostNode, that is not full per
166166
level of the tree.
@@ -174,6 +174,17 @@ children are locations (DataCoordinates) and a RightmostNode will not have a
174174
location until it is full and written out. Instead, the rightmost child can be
175175
found in the RightmostPath at the parent's height - 1.
176176

177+
The index tree is stored with one RightmostNode from each level written to the
178+
master node such that these nodes trace the path of the last write location.
179+
This means all RightmostNodes can be modified and are in the master node, while
180+
all the other nodes are full and never modified again.
181+
182+
The full nodes are all referenced by their parent node, but the "in-progress"
183+
partially-full RightmostNodes are not, which is why they are kept in a list in
184+
the MasterNode. They can be found simply because there is exactly one
185+
RightmostNode per level, since there is only one in-progress partially-full node
186+
per level.
187+
177188
## Selection of default fan out
178189

179190
Our default fan_out is 32. Given that, one full "height 2" node refers to 32
@@ -201,14 +212,3 @@ can store 10 levels of RightmostNodes in the available 4060 bytes of the
201212
MasterNode. So the total number of records we can index with the default fan_out
202213
of 32 and the default page_size of 4096 is: (31 x 32⁹) + (31 x 32⁸) ... + (31 x
203214
32) + 31 = 1,125,899,906,842,623 records or over 1 quadrillion records.
204-
205-
The tree is stored with one RightmostNode from each level written to the master
206-
node such that these nodes trace the path of the last write location. This means
207-
all RightmostNodes can be modified and are in the master node, while all the
208-
other nodes are full and never modified again.
209-
210-
The full nodes are all referenced by their parent node, but the "in-progress"
211-
partially-full RightmostNodes are not, which is why they are kept in a list in
212-
the MasterNode. They can be found simply because there is exactly one
213-
RightmostNode per level, since there is only one in-progress partially-full node
214-
per level.

0 commit comments

Comments
 (0)