[Tarantool-patches] [PATCH v2 5/7] qsync: provide a way to encode preallocated CONFIRM/ROLLBACK entries

Vladislav Shpilevoy v.shpilevoy at tarantool.org
Fri Jul 24 01:10:57 MSK 2020


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.
> 


More information about the Tarantool-patches mailing list