[PATCH 4/6] txn: do not require space id for nop requests

Vladimir Davydov vdavydov.dev at gmail.com
Thu Jun 28 14:10:56 MSK 2018


On Thu, Jun 28, 2018 at 01:54:22PM +0300, Konstantin Osipov wrote:
> * Vladimir Davydov <vdavydov.dev at gmail.com> [18/06/28 13:39]:
> > On Thu, Jun 28, 2018 at 01:23:22PM +0300, Konstantin Osipov wrote:
> > > * Vladimir Davydov <vdavydov.dev at gmail.com> [18/06/28 12:14]:
> > > > But txn_commit_nop() lives in txn.c. That's why I called it like that.
> > > 
> > > Let's move it then.
> > 
> > That's going to look weird, because this function depends on internal
> > txn stuff. IMHO it all looks consistent as it is:
> > 
> >   txn_begin_stmt - prepare DML request in transaction
> >   txn_commit_stmt - commit DML request statement
> > 
> >   txn_commit_nop - commit NOP request statement.
> > 
> > No?
> 
> I see no reason why it should depend on it. Ideally you should be
> able to simply call txn_begin_stmt()/txn_commit_stmt(), and that's
> it. 
> 
> What's the problem?

In order to call txn_begin_stmt()/txn_commit_stmt() for a NOP request,
we'll have to teach them to handle space == NULL, but I don't want to
add ifs to the hot path, that's why I decieded to introduce a new
function for handling NOP.



More information about the Tarantool-patches mailing list