jocko icon indicating copy to clipboard operation
jocko copied to clipboard

Commit log Raft backend

Open travisjeffery opened this issue 8 years ago • 2 comments

Right now I'm using bolt for the Raft backend. But we could use Jocko's own commit log implementation for the backend. Would remove a dep and make things more consistent.

This entails writing this: https://github.com/hashicorp/raft-boltdb, with https://github.com/travisjeffery/jocko/tree/master/commitlog.

travisjeffery avatar Dec 06 '17 11:12 travisjeffery

@travisjeffery 👋 I had a look at implementing this here but didn't get too far.

The CommitLog can't currently delete a range, so the tests (that I copied from raft-boltdb) for the LogStore implementation are failing. I was going to just delete from the upper index, but that could have bad consequences. https://github.com/Mongey/jocko/blob/c0a90d8b143b785e76721013b74592bbd6eb98fc/commitlog/log_store.go#L52-L54

StableStore looks like a KV store, I'm not quite sure how that'd be implemented with CommitLog, unless we had a commit log per key, or if we implemented a kafka-streams style KTable on top of the CommitLog.

🤔 I've only started looking at the codebase, so maybe there's something obvious that I'm missing

Mongey avatar Dec 19 '17 19:12 Mongey

@Mongey cool, thanks. Yeah I knew I'd have to change the commit log API or wrap it. I'll have to look into it some more to figure out what to do about the StableStore.

travisjeffery avatar Jan 03 '18 18:01 travisjeffery