From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp50.i.mail.ru (smtp50.i.mail.ru [94.100.177.110]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 30AB5469719 for ; Tue, 17 Nov 2020 13:00:21 +0300 (MSK) References: <0f6505cf411bd9e7e11f42b5b6a8526b6b291ce1.1605570907.git.v.shpilevoy@tarantool.org> From: Serge Petrenko Message-ID: <5b1bfa71-72d9-7f4e-27b8-5ad3ee0b8951@tarantool.org> Date: Tue, 17 Nov 2020 13:00:20 +0300 MIME-Version: 1.0 In-Reply-To: <0f6505cf411bd9e7e11f42b5b6a8526b6b291ce1.1605570907.git.v.shpilevoy@tarantool.org> Content-Type: text/plain; charset="utf-8"; format="flowed" Content-Transfer-Encoding: 8bit Content-Language: en-GB Subject: Re: [Tarantool-patches] [PATCH 08/12] raft: introduce vtab for disk and network List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vladislav Shpilevoy , tarantool-patches@dev.tarantool.org, gorcunov@gmail.com 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