[Tarantool-patches] [PATCH 6/7] iproto: implement interactive transactions over iproto streams
Vladimir Davydov
vdavydov at tarantool.org
Mon Aug 9 13:39:01 MSK 2021
On Fri, Aug 06, 2021 at 03:59:30PM +0300, Vladimir Davydov wrote:
> On Thu, Aug 05, 2021 at 09:17:44PM +0300, mechanik20051988 wrote:
> > + /*
> > + * When we do any operations (which are written to `wal`)
> > + * outside of transaction, we consider each such operation
> > + * as a small transaction and write it to `wal` immediately.
> > + * When operation is performed as part of transaction, we
> > + * write all transaction to `wal` at the commit. In this case,
> > + * `is_commit` flag will be set when writing to `wal` for the
> > + * last operation in transaction, the rest operations must have
> > + * this flag set to false, to mark that they all belongs to the
> > + * same transaction.
> > + */
> > + if (txn != NULL)
> > + msg->header.is_commit = false;
>
> AFAIU this flag is used only when a statement is written to WAL.
> Please remove.
TX reuses request::header if it is set so is_commit would propagate to
WAL and break recovery, which isn't what we want so this is technically
correct. However, I think we should clear the whole request::header
instead - we don't need it to apply a request, we only need it for
replication. Will send a patch in reply to this email.
More information about the Tarantool-patches
mailing list