From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Thu, 20 Jun 2019 14:52:21 +0300 From: Vladimir Davydov Subject: Re: [tarantool-patches] [PATCH v4 3/9] txn: get rid of autocommit from a txn structure Message-ID: <20190620115221.ns5jsvhn3xk6khsd@esperanza> References: <318da5c367be4c0cfcbc049d50ec619672ac5629.1560978655.git.georgy@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <318da5c367be4c0cfcbc049d50ec619672ac5629.1560978655.git.georgy@tarantool.org> To: Georgy Kirichenko Cc: tarantool-patches@freelists.org List-ID: 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