4 ms·
Congrats, how does compaction work? I assume you can serve kvs from memory?
by alexnewman 12y ago
Congrats, how does compaction work? I assume you can serve kvs from memory?
- alexnewman 12y agoOh and can I call this from c easily?
- alexnewman 12y agoOh and can I stop using zk now?
- ongardie 12y agoThere's not currently an extern "C" wrapper, but I don't think that'd be too much work to write.
- ongardie 12y agoCompaction in LogCabin uses a snapshotting approach. It writes a header to a snapshot file, then forks off a child process to write the data into a snapshot. The data is just each node in the tree serialized as a protobuf using a pre-order traversal, IIRC. Much more detail on compaction [1] mentioning LogCabin explicitly. LogCabin does currently keep all data in memory, so it never touches disk for read requests. It also keeps a copy of the entire log in memory for now, but I hope to address that eventually [2]. [1] https://github.com/ongardie/dissertation#readme https://github.com/ongardie/dissertation#readme [2] https://github.com/logcabin/logcabin/issues/106 https://github.com/logcabin/logcabin/issues/106