Commit Graph

152 Commits

Author SHA1 Message Date
Calle Wilund
80b244cc4b commitlog: fix using wrong segment
Commit log segment "finish_and_get_new" should not call "new_segment"
explicitly, since more than one invocation might get there on the same
flush condition (segment full).

Signed-off-by: Calle Wilund <calle@cloudius-systems.com>
2015-03-09 17:54:47 +02:00
Calle Wilund
054f9ed082 Initial commit log support.
Implements a cassandra-file-compatible segmented log
of "mutations". Handles "batch" and "periodic" mode like
stock version. Also includes "dirty" management for the
interaction log/memtable.

Supports:
* add
* sync/flush
* clear dirty bits (thus discarding segments)

Many more estoric stock functions not yet implemented.

Missing: Storage management. Does not deal with total
size on disk of segments yet. Nor does it have any provisions
for dealing with active buffer bloat should async writes stall.

[avi: adjust for future<>::rescue() removal]
Signed-off-by: Calle Wilund <calle@cloudius-systems.com>
2015-03-05 11:06:09 +02:00