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>, gorcunov@gmail.com
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH 3/7] txn_limbo: fix promote term filtering
Date: Mon, 21 Jun 2021 11:55:30 +0300	[thread overview]
Message-ID: <84dbc62c-6ed1-4d07-ba3b-83a2f69f523a@tarantool.org> (raw)
In-Reply-To: <d309c8a4-3cbb-c3b1-7d75-a162b63ab6fe@tarantool.org>



19.06.2021 01:49, Vladislav Shpilevoy пишет:
> Hi! Thanks for the fixes!
>
>> 15.06.2021 23:57, Vladislav Shpilevoy пишет:
>>> Thanks for the patch!
>>>
>>> On 10.06.2021 15:32, Serge Petrenko via Tarantool-patches wrote:
>>>> txn_limbo_process() used to filter out promote requests whose term was
>>>> equal to the greatest term seen. This wasn't correct for PROMOTE entries
>>>> with term 1.
>>>>
>>>> Such entries appear after box.ctl.promote() is issued on an instance
>>>> with disabled elections. Every PROMOTE entry from such an instance has
>>>> term 1, but should still be applied. Fix this in the patch.
>>> Didn't we agree that PROMOTE should bump the term always? I see no purpose
>>> for the PROMOTE which never bumps the term except for the tests, but for
>>> such occasion it would be better to have internal.make_leader() or something
>>> which bypasses everything. Although the best option would to bump the term
>>> always.
>>>
>>> I see you did something in the last commit about that, but the part
>>> about `limbo->promote_greatest_term > 1` still remains. It looks very
>>> illegal to point out some terms as "special".
>> What about old instances?
>> They may issue multiple promotes for the same term when elections are off.
> What if they issue multiple promotes for the same term > 1? They could have
> elections enabled, then the term was bumped a few times, then elections were
> turned off again. Next promotes will use the current term which is > 1,
> won't they?

Yes, they will.

But such promotes must be filtered out because we can't  be sure if they 
were
issued with or without elections.

I still think we need some compatibility with old instances. At least 
for the case
when no elections were used at all.


>> Previous behaviour (wrong, because we forgot to filter out too old promotes at all)
>> made the instance apply all such promotes.
>>
>> I thought we should allow multiple promotes, at least for the default term (1), which
>> happen only when elections are turned off and have never been turned on.
>>
>> Otherwise, having a new instance together with the old one in the same cluster,
>> you'll have one of them apply all the promotes for one term, and have one dataset,
>> and the other ignore all but the first promote, and have possibly different data.> I did fix the issue in the last commit. All the new instances will issue promotes with
>> increasing term each time, and the term will be >= 2.
>>
>> So all the promotes with term == 1 surely will be from the old instances.

-- 
Serge Petrenko


  reply	other threads:[~2021-06-21  8:55 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-10 13:32 [Tarantool-patches] [PATCH 0/7] forbid implicit limbo ownership transition Serge Petrenko via Tarantool-patches
2021-06-10 13:32 ` [Tarantool-patches] [PATCH 1/7] replication: always send raft state to subscribers Serge Petrenko via Tarantool-patches
2021-06-10 16:47   ` Cyrill Gorcunov via Tarantool-patches
2021-06-11  8:43     ` Serge Petrenko via Tarantool-patches
2021-06-11  8:44       ` Cyrill Gorcunov via Tarantool-patches
2021-06-15 20:53   ` Vladislav Shpilevoy via Tarantool-patches
2021-06-17 21:00     ` Serge Petrenko via Tarantool-patches
2021-06-10 13:32 ` [Tarantool-patches] [PATCH 2/7] replication: forbid implicit limbo owner transition Serge Petrenko via Tarantool-patches
2021-06-15 20:55   ` Vladislav Shpilevoy via Tarantool-patches
2021-06-17 21:00     ` Serge Petrenko via Tarantool-patches
2021-06-18 22:49   ` Vladislav Shpilevoy via Tarantool-patches
2021-06-21 10:13     ` Serge Petrenko via Tarantool-patches
2021-06-10 13:32 ` [Tarantool-patches] [PATCH 3/7] txn_limbo: fix promote term filtering Serge Petrenko via Tarantool-patches
2021-06-15 20:57   ` Vladislav Shpilevoy via Tarantool-patches
2021-06-17 21:00     ` Serge Petrenko via Tarantool-patches
2021-06-18 22:49       ` Vladislav Shpilevoy via Tarantool-patches
2021-06-21  8:55         ` Serge Petrenko via Tarantool-patches [this message]
2021-06-10 13:32 ` [Tarantool-patches] [PATCH 4/7] txn_limbo: persist the latest effective promote in snapshot Serge Petrenko via Tarantool-patches
2021-06-15 20:59   ` Vladislav Shpilevoy via Tarantool-patches
2021-06-17 21:00     ` Serge Petrenko via Tarantool-patches
2021-06-10 13:32 ` [Tarantool-patches] [PATCH 5/7] replication: send latest effective promote in initial join Serge Petrenko via Tarantool-patches
2021-06-15 21:00   ` Vladislav Shpilevoy via Tarantool-patches
2021-06-17 21:00     ` Serge Petrenko via Tarantool-patches
2021-06-18 22:52       ` Vladislav Shpilevoy via Tarantool-patches
2021-06-21 10:12         ` Serge Petrenko via Tarantool-patches
2021-06-10 13:32 ` [Tarantool-patches] [PATCH 6/7] box: introduce `box.ctl.demote` Serge Petrenko via Tarantool-patches
2021-06-18 22:52   ` Vladislav Shpilevoy via Tarantool-patches
2021-06-21 14:56     ` Serge Petrenko via Tarantool-patches
2021-06-10 13:32 ` [Tarantool-patches] [PATCH 7/7] box: make promote/demote always bump the term Serge Petrenko via Tarantool-patches
2021-06-15 21:00   ` Vladislav Shpilevoy via Tarantool-patches
2021-06-17 21:00     ` Serge Petrenko via Tarantool-patches
2021-06-18 22:53   ` Vladislav Shpilevoy via Tarantool-patches
2021-06-21 15:02     ` Serge Petrenko via Tarantool-patches
2021-06-15 20:53 ` [Tarantool-patches] [PATCH 0/7] forbid implicit limbo ownership transition 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=84dbc62c-6ed1-4d07-ba3b-83a2f69f523a@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 3/7] txn_limbo: fix promote term filtering' \
    /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