[tarantool-patches] [PATCH v4 3/9] txn: get rid of autocommit from a txn structure
Vladimir Davydov
vdavydov.dev at gmail.com
Thu Jun 20 14:52:21 MSK 2019
On Thu, Jun 20, 2019 at 12:23:10AM +0300, Georgy Kirichenko wrote:
> @@ -1313,9 +1351,17 @@ box_sequence_reset(uint32_t seq_id)
> static inline void
> box_register_replica(uint32_t id, const struct tt_uuid *uuid)
> {
> + struct txn *txn = txn_begin();
> + if (txn == NULL)
> + diag_raise();
> if (boxk(IPROTO_INSERT, BOX_CLUSTER_ID, "[%u%s]",
> - (unsigned) id, tt_uuid_str(uuid)) != 0)
> + (unsigned) id, tt_uuid_str(uuid)) != 0) {
> + txn_rollback();
> diag_raise();
> + }
> + if (txn_commit(txn) != 0)
> + diag_raise();
> + fiber_gc();
> assert(replica_by_uuid(uuid)->id == id);
> }
>
It looks like you didn't addressed any of my comments to v3,
neither did you reply to the email:
https://www.freelists.org/post/tarantool-patches/PATCH-v3-0514-txn-get-rid-of-autocommit-from-a-txn-structure,1
More information about the Tarantool-patches
mailing list