Skip to content

Commit

Permalink
commitlog: Move cycle/sync/flush logic to message loop
Browse files Browse the repository at this point in the history
Makes all write/flush operations into messages processing
controlled/serialized by a (secondary) task loop.

Actual IO becomes serialized, and should be processed in
the order we work through segments.

This includes periodic sync, even though we probably want to
nice it up a bit once replenish/new/delete moves as well.
Should be cleaned up to handle close/terminate in yet a
separate loop, as to not block active segment writes.
This includes flushing a discarded segment.

The places we actually need to wait for things, we use the
waitable counters. Note that timed/batch cycle right now
_issues_ the write/flush without actual waiting, the only
delay is through actual serialization of operations and
timeout is used for the full op-wait. In later stages we
probably want to change it so messages are delayed in some
cases, causing latencies, but limiting IO/disk usage.
  • Loading branch information
Calle Wilund authored and elcallio committed Jul 6, 2022
1 parent 3c5343c commit 7497555
Showing 1 changed file with 262 additions and 143 deletions.

0 comments on commit 7497555

Please sign in to comment.