[tarantool-patches] [PATCH v2 3/3] Transaction support for applier
Vladimir Davydov
vdavydov.dev at gmail.com
Thu Mar 7 13:38:43 MSK 2019
On Wed, Mar 06, 2019 at 11:16:18PM +0300, Georgy Kirichenko wrote:
> Applier fetch incoming rows to form a transaction and then apply it.
> Rows are fetched and stored on fiber gc region until last transaction row
> with is_commit was fetched. After fetch a multi row transaction is going to be
> applied into txn_begin/txn_commit/txn_rolback boundaries. At this time
> we could not apply single row transaction in such boundaries because of
> ddl which does not support non auto commit transactions.
>
> Closes: #2798
> Needed for: #980
> ---
> src/box/applier.cc | 211 ++++++++++++++++------
> test/replication/transaction.result | 240 ++++++++++++++++++++++++++
> test/replication/transaction.test.lua | 86 +++++++++
> 3 files changed, 482 insertions(+), 55 deletions(-)
> create mode 100644 test/replication/transaction.result
> create mode 100644 test/replication/transaction.test.lua
>
> diff --git a/src/box/applier.cc b/src/box/applier.cc
> index a687d2bea..f0a779aa7 100644
> --- a/src/box/applier.cc
> +++ b/src/box/applier.cc
> @@ -429,6 +429,146 @@ applier_join(struct applier *applier)
> applier_set_state(applier, APPLIER_READY);
> }
>
> +/**
> + * Helper struct to bind rows in a list.
> + */
> +struct xrow_header_item {
I like that you now use a list instead of a dynamically growing array
for storing rows. This spares us from the necessity of implementing
region_realloc. Don't like the name though. What about applier_tx_stmt?
> + struct stailq_entry next;
> + struct xrow_header row;
> +};
Please add comments to struct members.
Also, it doesn't seem that you have addressed all my previous comments.
Please go through them once again.
More information about the Tarantool-patches
mailing list