From: Cyrill Gorcunov via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: Serge Petrenko <sergepetrenko@tarantool.org>
Cc: tml <tarantool-patches@dev.tarantool.org>,
Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
Subject: Re: [Tarantool-patches] [PATCH v3] txn: convert flags to explicit bitfield
Date: Thu, 4 Feb 2021 17:31:57 +0300 [thread overview]
Message-ID: <20210204143157.GG2172@grain> (raw)
In-Reply-To: <dacced2d-b655-2faa-6bec-3a1e32d2906f@tarantool.org>
On Thu, Feb 04, 2021 at 05:01:07PM +0300, Serge Petrenko wrote:
...
> > /**
> > * Synchronous transaction touched sync spaces, or an
> > * asynchronous transaction blocked by a sync one until it
> > * is confirmed.
> > */
> > - TXN_WAIT_SYNC,
> > + TXN_WAIT_SYNC = 0x10,
> > /**
> > * Synchronous transaction 'waiting for ACKs' state before
> > * commit. In this state it waits until it is replicated
> > @@ -82,14 +82,14 @@ enum txn_flag {
> > * commit and returns success to a user.
> > * TXN_WAIT_SYNC is always set, if TXN_WAIT_ACK is set.
> > */
> > - TXN_WAIT_ACK,
> > + TXN_WAIT_ACK = 0x20,
>
> Since setting `TXN_WAIT_ACK` always implies setting `TXN_WAIT_SYNC`, and
> when TXN_WAIT_ACK is cleared, TXN_WAIT_SYNC is also cleared, you may
> define TXN_WAIT_ACK = 0x30 for simplicity.
> Then setting TXN_WAIT_ACK will set TXN_WAIT_SYNC implicitly. And same for
> clearing TXN_WAIT_ACK.
Yes, but this won't get exact match for txn_has_flag, which tests
for a single bit now. Surely I can setup
TXN_WAIT_ACK = 0x20 | TXN_WAIT_SYNC
if you and Vlad agrees.
next prev parent reply other threads:[~2021-02-04 14:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-04 11:19 Cyrill Gorcunov via Tarantool-patches
2021-02-04 14:01 ` Serge Petrenko via Tarantool-patches
2021-02-04 14:31 ` Cyrill Gorcunov via Tarantool-patches [this message]
2021-02-05 7:53 ` Serge Petrenko via Tarantool-patches
2021-02-05 8:22 ` Cyrill Gorcunov via Tarantool-patches
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210204143157.GG2172@grain \
--to=tarantool-patches@dev.tarantool.org \
--cc=gorcunov@gmail.com \
--cc=sergepetrenko@tarantool.org \
--cc=v.shpilevoy@tarantool.org \
--subject='Re: [Tarantool-patches] [PATCH v3] txn: convert flags to explicit bitfield' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox