Tarantool development patches archive
 help / color / mirror / Atom feed
From: Serge Petrenko via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>,
	tarantool-patches@dev.tarantool.org, gorcunov@gmail.com
Subject: Re: [Tarantool-patches] [PATCH 1/1] qsync: handle async txns right during CONFIRM
Date: Tue, 1 Jun 2021 10:37:15 +0300	[thread overview]
Message-ID: <17dc11ec-123e-7f00-aff6-0e9170cfae1a@tarantool.org> (raw)
In-Reply-To: <c9fbdb3d-a2a1-e8eb-27dd-5f8db407d8ac@tarantool.org>



28.05.2021 22:13, Vladislav Shpilevoy пишет:
> Hi! Thanks for the review!
>
>>> diff --git a/src/box/txn_limbo.c b/src/box/txn_limbo.c
>>> index f287369a2..05f0bf30a 100644
>>> --- a/src/box/txn_limbo.c
>>> +++ b/src/box/txn_limbo.c
>>> @@ -389,6 +389,27 @@ txn_limbo_read_confirm(struct txn_limbo *limbo, int64_t lsn)
>>>                 */
>>>                if (e->lsn == -1)
>>>                    break;
>>> +        } else if (e->txn->signature < 0) {
>>> +            /*
>>> +             * A transaction might be covered by the CONFIRM even if
>>> +             * it is not written to WAL yet when it is an async
>>> +             * transaction. It could be created just when the
>>> +             * CONFIRM was being written to WAL.
>>> +             */
>>> +            assert(e->txn->status == TXN_PREPARED);
>>> +            /*
>>> +             * Let it complete normally as a plain transaction.
>>> +             */
>>> +            txn_clear_flags(e->txn, TXN_WAIT_SYNC | TXN_WAIT_ACK);
>> AFAICS it's enough to clear WAIT_SYNC here.
>> Asynchronous transactions never have WAIT_ACK set, do they?
> Yes, sorry, I was in a big hurry when sent this patch. Fixed:
>
> ====================
> @@ -400,7 +400,7 @@ txn_limbo_read_confirm(struct txn_limbo *limbo, int64_t lsn)
>   			/*
>   			 * Let it complete normally as a plain transaction.
>   			 */
> -			txn_clear_flags(e->txn, TXN_WAIT_SYNC | TXN_WAIT_ACK);
> +			txn_clear_flags(e->txn, TXN_WAIT_SYNC);
>   			txn_limbo_remove(limbo, e);


Hi! Thanks for the fixes! LGTM.

-- 
Serge Petrenko


  reply	other threads:[~2021-06-01  7:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-27 21:28 Vladislav Shpilevoy via Tarantool-patches
2021-05-28  7:23 ` Cyrill Gorcunov via Tarantool-patches
2021-05-28 19:13   ` Vladislav Shpilevoy via Tarantool-patches
2021-05-28  9:01 ` Serge Petrenko via Tarantool-patches
2021-05-28 19:13   ` Vladislav Shpilevoy via Tarantool-patches
2021-06-01  7:37     ` Serge Petrenko via Tarantool-patches [this message]
2021-06-01 20:59 ` Vladislav Shpilevoy 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=17dc11ec-123e-7f00-aff6-0e9170cfae1a@tarantool.org \
    --to=tarantool-patches@dev.tarantool.org \
    --cc=gorcunov@gmail.com \
    --cc=sergepetrenko@tarantool.org \
    --cc=v.shpilevoy@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH 1/1] qsync: handle async txns right during CONFIRM' \
    /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