[Tarantool-patches] [PATCH] vclock: rename vclock_reset to vclock_set
Konstantin Osipov
kostja.osipov at gmail.com
Wed Apr 15 19:32:46 MSK 2020
* Cyrill Gorcunov <gorcunov at gmail.com> [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
More information about the Tarantool-patches
mailing list