Tarantool development patches archive
 help / color / mirror / Atom feed
From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
To: Konstantin Osipov <kostja@tarantool.org>
Cc: tarantool-patches@freelists.org
Subject: [tarantool-patches] Re: [PATCH v2 1/2] swim: make incarnation struct
Date: Sun, 23 Jun 2019 19:54:00 +0200	[thread overview]
Message-ID: <d3f50af2-00ac-c8be-9be0-9ea2a8fb5482@tarantool.org> (raw)
In-Reply-To: <20190623083156.GB7915@atlas>



On 23/06/2019 10:31, Konstantin Osipov wrote:
> * Vladislav Shpilevoy <v.shpilevoy@tarantool.org> [19/06/23 09:42]:
>> Traditional SWIM describes member version as incarnation -
>> volatile monotonically growing number to refute false gossips.
>> But it is not enough in the real world because of necessity to
>> detect restarts and refute information from previous lifes of an
>> instance.
>>
>> Incarnation is going to be a two-part value with persistent upper
>> part and volatile lower part. This patch does preparations making
>> incarnation struct instead of a number.
> 
> LGTM.
> 
> BTW, why is incarnation = uint64max for a non-existent member?
> Wouldn't it be more logical to make it int64min instead?
> 

Incarnation is uint, so min value is 0. If you assign INT64_MIN to
incarnation, you will get the same UINT64_MAX because of cast to
uint.

Logic was to choose an unachievable value, it does not really
matter which one. In case of uint the most unlikely value is
UINT64_MAX.

Both patches are pushed to the master.

  reply	other threads:[~2019-06-23 17:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-22 21:18 [tarantool-patches] [PATCH v2 0/2] SWIM generation Vladislav Shpilevoy
2019-06-22 21:18 ` [tarantool-patches] [PATCH v2 1/2] swim: make incarnation struct Vladislav Shpilevoy
2019-06-23  8:31   ` [tarantool-patches] " Konstantin Osipov
2019-06-23 17:54     ` Vladislav Shpilevoy [this message]
2019-06-22 21:18 ` [tarantool-patches] [PATCH v2 2/2] swim: introduce incarnation.generation Vladislav Shpilevoy
2019-06-23  9:00   ` [tarantool-patches] " Konstantin Osipov

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=d3f50af2-00ac-c8be-9be0-9ea2a8fb5482@tarantool.org \
    --to=v.shpilevoy@tarantool.org \
    --cc=kostja@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --subject='[tarantool-patches] Re: [PATCH v2 1/2] swim: make incarnation struct' \
    /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