Tarantool development patches archive
 help / color / mirror / Atom feed
From: Konstantin Osipov <kostja@tarantool.org>
To: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
Cc: tarantool-patches@freelists.org
Subject: [tarantool-patches] Re: [PATCH v2 1/2] swim: disseminate event for log(cluster_size) steps
Date: Thu, 4 Jul 2019 11:10:09 +0300	[thread overview]
Message-ID: <20190704081009.GC24820@atlas> (raw)
In-Reply-To: <66e2eca5-882b-8479-50c1-ea6cd148afdb@tarantool.org>

* Vladislav Shpilevoy <v.shpilevoy@tarantool.org> [19/07/04 10:15]:
> >> +	/*
> >> +	 * Logarithm is a perfect number of disseminations of an
> >> +	 * event.
> >> +	 *
> >> +	 * Firstly, it matches the dissemination speed.
> >> +	 *
> >> +	 * Secondly, bigger number of disseminations (for example,
> >> +	 * linear) causes events and anti-entropy starvation in
> >> +	 * big clusters, when lots of events occupy the whole UDP
> >> +	 * packet, and factually the same packet content is being
> >> +	 * sent for quite a long time. No randomness. Anti-entropy
> >> +	 * does not get a chance to disseminate something new and
> >> +	 * random. Bigger orders are redundant and harmful.
> >> +	 *
> >> +	 * Thirdly, logarithm is proved by the original
> >> +	 * SWIM paper as the best option.
> >> +	 */
> >> +	member->status_ttd = ceil(log2(mh_size(swim->members)));
> 
> I've changed this place to
> 
>     member->status_ttd = ceil(log2(mh_size(swim->members))) + 1;
> 
> It allows to do not break the tests in this commit, and fixes a bug,
> when status_ttd became negative for 'self'. Because ceil(log2(1)) = 0,
> and on a next round step it became -1, -2, etc.
> 
> I didn't push the patch yet, if you have anything against that.

go ahead and push

-- 
Konstantin Osipov, Moscow, Russia

  reply	other threads:[~2019-07-04  8:10 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-30 20:01 [tarantool-patches] [PATCH v2 0/2] SWIM log TTD, and suspicious anti-entropy Vladislav Shpilevoy
2019-06-30 20:01 ` [tarantool-patches] [PATCH v2 1/2] swim: disseminate event for log(cluster_size) steps Vladislav Shpilevoy
2019-07-03 19:06   ` [tarantool-patches] " Konstantin Osipov
2019-07-03 23:30     ` Vladislav Shpilevoy
2019-07-04  8:10       ` Konstantin Osipov [this message]
2019-06-30 20:01 ` [tarantool-patches] [PATCH v2 2/2] swim: be suspicious when add new member Vladislav Shpilevoy
2019-07-03 19:07   ` [tarantool-patches] " Konstantin Osipov
2019-07-03 23:32     ` Vladislav Shpilevoy
2019-07-04  8:10       ` Konstantin Osipov
2019-07-05 22:45 ` [tarantool-patches] Re: [PATCH v2 0/2] SWIM log TTD, and suspicious anti-entropy 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=20190704081009.GC24820@atlas \
    --to=kostja@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --cc=v.shpilevoy@tarantool.org \
    --subject='[tarantool-patches] Re: [PATCH v2 1/2] swim: disseminate event for log(cluster_size) steps' \
    /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