[Tarantool-patches] [PATCH 04/10] box/txn: move setup of txn start to txn_prepare

Konstantin Osipov kostja.osipov at gmail.com
Wed Mar 18 16:58:15 MSK 2020


* Cyrill Gorcunov <gorcunov at gmail.com> [20/03/18 15:42]:
> On Sat, Mar 07, 2020 at 12:30:03AM +0300, Konstantin Osipov wrote:
> > > +
> > > +	/*
> > > +	 * It is important to set start transaction
> > > +	 * time at the last moment, when everything
> > > +	 * is ready to initiate commit procedure,
> > > +	 * just to be more precise in timings to
> > > +	 * detect long WAL writes.
> > > +	 */
> > 
> > I think this comment is misleading. There are no yields
> > between start of txn_prepare() and end. There may appear yields
> > when vinyl lock manager is more smart, but there are no yields
> > now. So ev_monotonic_now returns exactly the same value regardless 
> > of where you call it.
> 
> Kostya, I happen to miss this comment. Look, as far as I understand
> this is not about yields, but this timing is used to detect if the
> write itself takes too long time.

ev time is only updated once per event loop cycle, so as long as
you don't yield, your time is the same.


-- 
Konstantin Osipov, Moscow, Russia


More information about the Tarantool-patches mailing list