Tarantool development patches archive
 help / color / mirror / Atom feed
From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
To: Serge Petrenko <sergepetrenko@tarantool.org>, gorcunov@gmail.com
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH 4/4] txn_limbo: add ROLLBACK processing
Date: Sun, 21 Jun 2020 17:53:04 +0200	[thread overview]
Message-ID: <fc810393-9aeb-381a-2032-d0bab46583c5@tarantool.org> (raw)
In-Reply-To: <a92e05c9-98d7-db08-7f9b-10c46b5c71eb@tarantool.org>

>>> diff --git a/src/box/txn_limbo.c b/src/box/txn_limbo.c
>>> index a715a136e..c55f5bda1 100644
>>> --- a/src/box/txn_limbo.c
>>> +++ b/src/box/txn_limbo.c
>>> @@ -84,6 +84,16 @@ txn_limbo_remove(struct txn_limbo *limbo, struct txn_limbo_entry *entry)
>>>       rlist_del_entry(entry, in_queue);
>>>   }
>>>   +static inline void
>>> +txn_limbo_pop(struct txn_limbo *limbo, struct txn_limbo_entry *entry)
>>> +{
>>> +    assert(!rlist_empty(&entry->in_queue));
>>> +    assert(rlist_last_entry(&limbo->queue, struct txn_limbo_entry,
>>> +                 in_queue) == entry);
>>> +    (void) limbo;
>>> +    rlist_del_entry(entry, in_queue);
>>> +}
>> txn_limbo_remove is exactly the same as txn_limbo_pop. I suggest to keep
>> one of them.
>>
>> Everything else looks nice.
> 
> Assertions are different. I wanted to stress  that `pop` removes entries starting
> 
> from the tail, and `remove`, on the contrary,  removes them starting from the
> 
> head.

I didn't notice the assertions are different. In that case it is fine.

  reply	other threads:[~2020-06-21 15:53 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-18 12:13 [Tarantool-patches] [PATCH 0/4] sync replication: add rollback processing Serge Petrenko
2020-06-18 12:14 ` [Tarantool-patches] [PATCH 1/4] xrow: fix comment typo Serge Petrenko
2020-06-18 22:15   ` Vladislav Shpilevoy
2020-06-18 22:15   ` Vladislav Shpilevoy
2020-06-19 17:28     ` Serge Petrenko
2020-06-18 12:14 ` [Tarantool-patches] [PATCH 2/4] xrow: add ability to encode/decode ROLLBACK requests Serge Petrenko
2020-06-18 14:46   ` Cyrill Gorcunov
2020-06-19 17:30     ` Serge Petrenko
2020-06-18 12:14 ` [Tarantool-patches] [PATCH 3/4] txn_limbo: add timeout when waiting for acks Serge Petrenko
2020-06-18 12:14 ` [Tarantool-patches] [PATCH 4/4] txn_limbo: add ROLLBACK processing Serge Petrenko
2020-06-18 22:15   ` Vladislav Shpilevoy
2020-06-19 17:35     ` Serge Petrenko
2020-06-21 15:53       ` Vladislav Shpilevoy [this message]
2020-06-19 17:53   ` Serge Petrenko
2020-06-23  8:37   ` Serge Petrenko
2020-06-25 22:14   ` Vladislav Shpilevoy
2020-06-25 22:43     ` Vladislav Shpilevoy

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=fc810393-9aeb-381a-2032-d0bab46583c5@tarantool.org \
    --to=v.shpilevoy@tarantool.org \
    --cc=gorcunov@gmail.com \
    --cc=sergepetrenko@tarantool.org \
    --cc=tarantool-patches@dev.tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH 4/4] txn_limbo: add ROLLBACK processing' \
    /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