kelindar / column

High-performance, columnar, in-memory store with bitmap indexing in Go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

question about chunk and buffer

vicpang opened this issue · comments

really great project! I am reading the source code and find it a bit hard to understand the chunk and buffer layout, is there any documentation on the format of the buffer? It will help a lot for understanding!

Hello @vicpang, I'm a little confused by your question, but in general, each collection is a group of arrays, where the index i in each array represents the field data for row i. To prevent having to lock the entire collection for each insert/delete, the arrays are divided into chunks of 2^14 (16k), where each chunk is assigned it's own lock. You can then imagine a linear representation of chunks as the "chunk layout".

There is no real further documentation of this layout, although the commit code contains some useful comments. Please let me know if that wasn't the answer you were looking for.

hi @Dreeseaw thanks for the answer! this helps me to understand the chunk and buffer, previously I was reading the code and trying to guess what they mean!