Rocks DB example append flush vs immediate return requirement #1408
-
|
Hi! I'm trying to implement Version: 0.9.21 From the documentation of
In the
Also, the documentation states that:
I do not see anything like this in the Should the |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
the example is meant to provide a simple implementation of the In a real world application, the
Right. In this example there is no IO re-order and an application should not re-order any IO. OpenRaft calls
yes. |
Beta Was this translation helpful? Give feedback.
-
|
@drmingdrmer Does the documentation imply that logs must be persistent, meaning an in-memory implementation shouldn't be used in production? |
Beta Was this translation helpful? Give feedback.
the example is meant to provide a simple implementation of the
RaftLogStorageand does not implement the two-phase append mentioned in the doc.In a real world application, the
appendimplementation does not need toflush_wal()beforeappend()returns,flush_wal()can be delayed by putting it in a spawned task. And in this task, flush the WAL and call the callback.