Closed olebedev closed 1 month ago
Pages come in multiple sizes -- "orders" as referred to in the code base -- which are currently a power of 2 multiplied by 4096. Then there is a variable amount of overhead, depending on how many key-value pairs end up in the page. It's subject to change, but you can find the current format in the design doc, here: https://github.com/cberner/redb/blob/master/docs/design.md#leaf-page
Thanks for the insight, @cberner. I'll review the design first next time.
👋 Hi there, First, allow me to say thank you for building this, this is a truly great initiative.
My question is: what is the actual page size, meaning how much content can I fit into a single redb page?
Adding a context, I am trying to build something like singly-linked list on top of the redb Pages to fit potentially very large content - operations' log. It is important to keep all of it for the integrity checks purposes but the reads are usually happen on the recent chunk of that log, say latest page or head of the singly-linked list.
My thinking model currently is to have a fixed size structure like this:
With that I have hoped to make sure this structure can match the physical limit of the redb Page. However, I suspect I could be totally wrong here because the
PAGE_SIZE
I linked to above can be for internal representation. I haven't read the related code yet to figure it out by myself, I thought I would better ask here first to gather initial thoughts on the approach since it can be inefficient.Thank you for your time.
Kind regards, Oleg