[Tarantool-patches] [PATCH 08/12] raft: introduce vtab for disk and network

Serge Petrenko sergepetrenko at tarantool.org
Tue Nov 17 13:00:20 MSK 2020


17.11.2020 03:02, Vladislav Shpilevoy пишет:
> Raft is being moved to a separate library in src/lib. It means,
> it can't depend on anything from box/.
>
> The patch makes raft stop using replicaset and journal objects.
> They were used to broadcast messages to all the other nodes, and
> to persist updates.
>
> Now Raft does the same through vtab, which is configured by box.
> Broadcast still sends messages via relays, and disk write still
> uses the journal. But Raft does not depend on any specific journal
> or network API.
>
> Part of #5303
> ---
>   src/box/raft.c    | 63 ++++++++++++++++++++++++++++++++++++++-
>   src/box/raftlib.c | 75 ++++++++++-------------------------------------
>   src/box/raftlib.h | 24 ++++++++++++++-
>   3 files changed, 100 insertions(+), 62 deletions(-)
>
> diff --git a/src/box/raft.c b/src/box/raft.c
> index af6e71e0b..845525660 100644
> --- a/src/box/raft.c
> +++ b/src/box/raft.c
> @@ -29,7 +29,10 @@
>    * SUCH DAMAGE.
>    */
>   #include "box.h"
> +#include "error.h"
> +#include "journal.h"
>   #include "raft.h"
> +#include "relay.h"
>   #include "replication.h"

Just noticed: raft.c starts depending on xrow.h in this patch.

-- 
Serge Petrenko



More information about the Tarantool-patches mailing list