Allow segmented journal to flush periodically
Flushes to disk end up dominating our use of disk resources, as we issue
a flush after each write. This is not entirely efficient, as we may have
multiple outstanding writes in the actor queue -- and we ignore the
batching opportunity.
This patch makes it possible to configure an upper bound of the number
of outstanding bytes written which can remainin unflushed.
We flush whenever we reach this watermark or when we flush all messages
that have been submitted at the time the flush batch has been started.
JIRA: CONTROLLER-2108
Change-Id: I6f18de7871c89b5feffecc71580e1f440024f2a3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
75304124258a0277426061a4cfb5f79b7967faa4)