[Tarantool-patches] [PATCH v2 7/7] qsync: drop no longer used xrow_encode_confirm, rollback
Cyrill Gorcunov
gorcunov at gmail.com
Thu Jul 23 15:29:42 MSK 2020
Since we no longer allocate these entries via region_alloc
just drop them out as unused.
Signed-off-by: Cyrill Gorcunov <gorcunov at gmail.com>
---
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
More information about the Tarantool-patches
mailing list