From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-f195.google.com (mail-lj1-f195.google.com [209.85.208.195]) (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 D8836445327 for ; Mon, 27 Jul 2020 17:08:04 +0300 (MSK) Received: by mail-lj1-f195.google.com with SMTP id q4so17408181lji.2 for ; Mon, 27 Jul 2020 07:08:04 -0700 (PDT) From: Cyrill Gorcunov Date: Mon, 27 Jul 2020 17:06:50 +0300 Message-Id: <20200727140650.447750-7-gorcunov@gmail.com> In-Reply-To: <20200727140650.447750-1-gorcunov@gmail.com> References: <20200727140650.447750-1-gorcunov@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH v3 6/6] qsync: drop no longer used encoding helpers List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: tml Cc: Vladislav Shpilevoy Part-of #5129 Signed-off-by: Cyrill Gorcunov --- src/box/xrow.c | 26 -------------------------- src/box/xrow.h | 28 ---------------------------- 2 files changed, 54 deletions(-) diff --git a/src/box/xrow.c b/src/box/xrow.c index 3609dae0f..21d949ba5 100644 --- a/src/box/xrow.c +++ b/src/box/xrow.c @@ -920,32 +920,6 @@ xrow_encode_synchro(struct xrow_header *row, row->bodycnt = 1; } -int -xrow_encode_confirm(struct xrow_header *row, struct region *region, - uint32_t replica_id, int64_t lsn) -{ - struct synchro_body_bin *body = region_alloc(region, sizeof(*body)); - if (body == NULL) { - diag_set(OutOfMemory, sizeof(*body), "region_alloc", "body"); - return -1; - } - xrow_encode_synchro(row, body, replica_id, lsn, IPROTO_CONFIRM); - return 0; -} - -int -xrow_encode_rollback(struct xrow_header *row, struct region *region, - uint32_t replica_id, int64_t lsn) -{ - struct synchro_body_bin *body = region_alloc(region, sizeof(*body)); - if (body == NULL) { - diag_set(OutOfMemory, sizeof(*body), "region_alloc", "body"); - return -1; - } - xrow_encode_synchro(row, body, replica_id, lsn, IPROTO_ROLLBACK); - return 0; -} - 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 522bab259..2ecbe3ce0 100644 --- a/src/box/xrow.h +++ b/src/box/xrow.h @@ -240,20 +240,6 @@ xrow_encode_synchro(struct xrow_header *row, 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. @@ -265,20 +251,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