From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 7BFB220952 for ; Thu, 4 Jul 2019 04:10:12 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id G1NDESbmNxd5 for ; Thu, 4 Jul 2019 04:10:12 -0400 (EDT) Received: from smtp48.i.mail.ru (smtp48.i.mail.ru [94.100.177.108]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 364D11FF5F for ; Thu, 4 Jul 2019 04:10:11 -0400 (EDT) Date: Thu, 4 Jul 2019 11:10:09 +0300 From: Konstantin Osipov Subject: [tarantool-patches] Re: [PATCH v2 1/2] swim: disseminate event for log(cluster_size) steps Message-ID: <20190704081009.GC24820@atlas> References: <20190703190645.GB17318@atlas> <66e2eca5-882b-8479-50c1-ea6cd148afdb@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <66e2eca5-882b-8479-50c1-ea6cd148afdb@tarantool.org> Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-Help: List-Unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-Subscribe: List-Owner: List-post: List-Archive: To: Vladislav Shpilevoy Cc: tarantool-patches@freelists.org * Vladislav Shpilevoy [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