[Tarantool-patches] [PATCH v3 6/6] qsync: drop no longer used encoding helpers

Cyrill Gorcunov gorcunov at gmail.com
Mon Jul 27 17:06:50 MSK 2020


Part-of #5129

Signed-off-by: Cyrill Gorcunov <gorcunov at gmail.com>
---
 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



More information about the Tarantool-patches mailing list