From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtpng3.m.smailru.net (smtpng3.m.smailru.net [94.100.177.149]) (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 B365C445321 for ; Fri, 24 Jul 2020 01:10:58 +0300 (MSK) References: <20200723122942.196011-1-gorcunov@gmail.com> <20200723122942.196011-6-gorcunov@gmail.com> From: Vladislav Shpilevoy Message-ID: Date: Fri, 24 Jul 2020 00:10:57 +0200 MIME-Version: 1.0 In-Reply-To: <20200723122942.196011-6-gorcunov@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Tarantool-patches] [PATCH v2 5/7] qsync: provide a way to encode preallocated CONFIRM/ROLLBACK entries List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Cyrill Gorcunov , tml Thanks for the patch! > diff --git a/src/box/xrow.h b/src/box/xrow.h > index e21ede5a3..503140d1e 100644 > --- a/src/box/xrow.h > +++ b/src/box/xrow.h > @@ -215,6 +216,20 @@ int > xrow_encode_dml(const struct request *request, struct region *region, > struct iovec *iov); > > + > +/** > + * Encode the CONFIRM or ROLLBACK to row body and set row type. > + * @param row xrow header. > + * @param body body to encode. > + * @param replica_id master's instance id. > + * @param lsn last confirmed lsn. > + * @param type IPROTO_CONFIRM or IPROTO_ROLLBACK. 1. Lets start sentences from capital letters. > + */ > +int > +xrow_encode_confirm_rollback(struct xrow_header *row, 2. I would also rename xrow_encode_confirm_rollback -> xrow_encode_synchro. While we are here. I don't really like the current name. Too long, and a bit confusing. When I saw it first time, I thought it encodes confirmation of a rollback. > + struct request_synchro_body *body, > + uint32_t replica_id, int64_t lsn, int type); > + > /** > * Encode the CONFIRM to row body and set row type to > * IPROTO_CONFIRM. >