From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-f179.google.com (mail-lj1-f179.google.com [209.85.208.179]) (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 660B8445320 for ; Thu, 23 Jul 2020 15:31:22 +0300 (MSK) Received: by mail-lj1-f179.google.com with SMTP id q6so6129696ljp.4 for ; Thu, 23 Jul 2020 05:31:22 -0700 (PDT) From: Cyrill Gorcunov Date: Thu, 23 Jul 2020 15:29:42 +0300 Message-Id: <20200723122942.196011-8-gorcunov@gmail.com> In-Reply-To: <20200723122942.196011-1-gorcunov@gmail.com> References: <20200723122942.196011-1-gorcunov@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH v2 7/7] qsync: drop no longer used xrow_encode_confirm, rollback List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: tml Cc: Vladislav Shpilevoy Since we no longer allocate these entries via region_alloc just drop them out as unused. Signed-off-by: Cyrill Gorcunov --- src/box/xrow.c | 32 -------------------------------- src/box/xrow.h | 28 ---------------------------- 2 files changed, 60 deletions(-) diff --git a/src/box/xrow.c b/src/box/xrow.c index bebad2dd0..4fac170b3 100644 --- a/src/box/xrow.c +++ b/src/box/xrow.c @@ -911,38 +911,6 @@ xrow_encode_confirm_rollback(struct xrow_header *row, return 0; } -int -xrow_encode_confirm(struct xrow_header *row, struct region *region, - uint32_t replica_id, int64_t lsn) -{ - struct request_synchro_body *body; - - body = region_alloc(region, sizeof(*body)); - if (body == NULL) { - diag_set(OutOfMemory, sizeof(*body), "region_alloc", "body"); - return -1; - } - - return xrow_encode_confirm_rollback(row, body, replica_id, lsn, - IPROTO_CONFIRM); -} - -int -xrow_encode_rollback(struct xrow_header *row, struct region *region, - uint32_t replica_id, int64_t lsn) -{ - struct request_synchro_body *body; - - body = region_alloc(region, sizeof(*body)); - if (body == NULL) { - diag_set(OutOfMemory, sizeof(*body), "region_alloc", "body"); - return -1; - } - - return xrow_encode_confirm_rollback(row, body, replica_id, lsn, - IPROTO_ROLLBACK); -} - static int xrow_decode_confirm_rollback(struct xrow_header *row, uint32_t *replica_id, int64_t *lsn) diff --git a/src/box/xrow.h b/src/box/xrow.h index 503140d1e..86a9e3542 100644 --- a/src/box/xrow.h +++ b/src/box/xrow.h @@ -230,20 +230,6 @@ xrow_encode_confirm_rollback(struct xrow_header *row, 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. - * @param row xrow header. - * @param region Region to use to encode the confirmation body. - * @param replica_id master's instance id. - * @param lsn last confirmed lsn. - * @retval -1 on error. - * @retval 0 success. - */ -int -xrow_encode_confirm(struct xrow_header *row, struct region *region, - uint32_t replica_id, int64_t lsn); - /** * Decode the CONFIRM request body. * @param row xrow header. @@ -255,20 +241,6 @@ xrow_encode_confirm(struct xrow_header *row, struct region *region, int xrow_decode_confirm(struct xrow_header *row, uint32_t *replica_id, int64_t *lsn); -/** - * Encode the ROLLBACK row body and set row type to - * IPROTO_ROLLBACK. - * @param row xrow header. - * @param region Region to use to encode the rollback body. - * @param replica_id master's instance id. - * @param lsn lsn to rollback from, including it. - * @retval -1 on error. - * @retval 0 success. - */ -int -xrow_encode_rollback(struct xrow_header *row, struct region *region, - uint32_t replica_id, int64_t lsn); - /** * Decode the ROLLBACK row body. * @param row xrow header. -- 2.26.2