From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-f41.google.com (mail-lf1-f41.google.com [209.85.167.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 44990469719 for ; Thu, 5 Mar 2020 15:29:59 +0300 (MSK) Received: by mail-lf1-f41.google.com with SMTP id i10so4042614lfg.11 for ; Thu, 05 Mar 2020 04:29:59 -0800 (PST) From: Cyrill Gorcunov Date: Thu, 5 Mar 2020 15:29:34 +0300 Message-Id: <20200305122943.7324-2-gorcunov@gmail.com> In-Reply-To: <20200305122943.7324-1-gorcunov@gmail.com> References: <20200305122943.7324-1-gorcunov@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH 01/10] box: recovery_journal_create -- set journal here List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: tml Allows to eliminate code duplication. Signed-off-by: Cyrill Gorcunov --- src/box/box.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/box/box.cc b/src/box/box.cc index 09dd67ab4..eb5931e37 100644 --- a/src/box/box.cc +++ b/src/box/box.cc @@ -331,6 +331,7 @@ recovery_journal_create(struct recovery_journal *journal, struct vclock *v) { journal_create(&journal->base, recovery_journal_write, NULL); journal->vclock = v; + journal_set(&journal->base); } static void @@ -2055,7 +2056,6 @@ bootstrap_from_master(struct replica *master) engine_begin_final_recovery_xc(); struct recovery_journal journal; recovery_journal_create(&journal, &replicaset.vclock); - journal_set(&journal.base); if (!replication_anon) { applier_resume_to_state(applier, APPLIER_JOINED, @@ -2221,7 +2221,6 @@ local_recovery(const struct tt_uuid *instance_uuid, struct recovery_journal journal; recovery_journal_create(&journal, &recovery->vclock); - journal_set(&journal.base); /* * We explicitly request memtx to recover its -- 2.20.1