[Tarantool-patches] [PATCH v13 11/11] box/journal: redesign journal operations

Cyrill Gorcunov gorcunov at gmail.com
Thu Mar 19 13:49:51 MSK 2020


On Thu, Mar 19, 2020 at 01:37:49PM +0300, Konstantin Osipov wrote:
> * Cyrill Gorcunov <gorcunov at gmail.com> [20/03/19 12:12]:
> > --- a/src/box/wal.c
> > +++ b/src/box/wal.c
> > @@ -32,6 +32,7 @@
> >  
> >  #include "vclock.h"
> >  #include "fiber.h"
> > +#include "txn.h"
> 
> Please try to avoid including txn.h here.
> 
> You can do it, I'm pretty sure.

I use fiber_set_txn and in_txn helpers, they
are declared in txn.h.

The base idea is that setting fiber->storage.txn
to NULL is done inside the wal engine and should
be transparent to the caller (which implies that
fiber->storage.txn is preserved in case of error
and txn_rollback call is allowed).

Also the sync write in wal engine uses async write
internally, so I fetch the current txn via in_txn
and pass it as a completion data.


More information about the Tarantool-patches mailing list