[tarantool-patches] Re: [PATCH v2 1/2] swim: disseminate event for log(cluster_size) steps
Konstantin Osipov
kostja at tarantool.org
Thu Jul 4 11:10:09 MSK 2019
* Vladislav Shpilevoy <v.shpilevoy at 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
More information about the Tarantool-patches
mailing list