From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-f193.google.com (mail-lj1-f193.google.com [209.85.208.193]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 177D44696C3 for ; Wed, 15 Apr 2020 19:32:48 +0300 (MSK) Received: by mail-lj1-f193.google.com with SMTP id j3so3945335ljg.8 for ; Wed, 15 Apr 2020 09:32:47 -0700 (PDT) Date: Wed, 15 Apr 2020 19:32:46 +0300 From: Konstantin Osipov Message-ID: <20200415163246.GB21441@atlas> References: <20200415141359.16253-1-gorcunov@gmail.com> <20200415160902.GA21441@atlas> <20200415162105.GO3072@uranus> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200415162105.GO3072@uranus> Subject: Re: [Tarantool-patches] [PATCH] vclock: rename vclock_reset to vclock_set List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Cyrill Gorcunov Cc: tml * Cyrill Gorcunov [20/04/15 19:22]: > > > The `reset` keyword is too overloaded, its traditional > > > context is to setup some value either to zero or to default. > > > > > > That is not what we're doing in this helper: we rather set up > > > a new value to the replica_id in the map, keeping consistency > > > of the sum. > > > > > Thus lets name it as it should -- vclock_set. > > > > Well, one could argue that it's impossible to set a vclock > > component without violating consistency - vclock should never go > > back. > > > > reset() indicates that it can unwind the clock. > > Didn't you just named it in correct way -- vlock_unwind() ;-) > Anyway, we've been talking about this name in tchat and > I gave up. Drop the patch please. Let's rename vclock_reset if you like, but not back to vclock-set. vclock-set is too trivial a name to reflect this is a non-trivial op. vclock_reset() should be avoided, it's used only in a few special cases which I would love to weed out eventually. Let's call it vclock_hack1 (one - because we're only hacking on a single component, not entire clock), vclock_mutate, vclock_adjust, whatever, but not vclock_set please. -- Konstantin Osipov, Moscow, Russia