Add SegmentedFileJournal 06/81006/1
authorRobert Varga <robert.varga@pantheon.tech>
Mon, 4 Feb 2019 09:09:57 +0000 (10:09 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Tue, 19 Mar 2019 14:52:23 +0000 (15:52 +0100)
This adds an alternative Akka persistence journal implementation
based on Atomix's SegmentedJournal.

SegmentedJournal is a linear append-only log of entries, each of
which has a incrementing 63bit index. This logical structure is
stored in rolling segments -- i.e. entries are appended to current
segment until it is full, at which point a new segment is allocated
and writeout continues there. Old segments can be freed as long as
they are not needed.

This layout makes it good match to how Akka's persistence works,
with the one exception that the SegmentedJournal cannot explicitly
delete entries from the head of the journal.

SegmentedFileJournal allocates one SegmentedJournal for each
persistenceId it encounters and uses a dedicated actor for it. This
provides a major simplification in the implementation as well as
allows for concurrent persistence of multiple PersistentActors.

JIRA: CONTROLLER-1884
Change-Id: I78140b154bab44a3e17d5ffb76b040c62add3204
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 52fb7d830e43a9849c728c7b0d36470afe686fb5)


No differences found