From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Thu, 28 Jun 2018 14:10:56 +0300 From: Vladimir Davydov Subject: Re: [PATCH 4/6] txn: do not require space id for nop requests Message-ID: <20180628111056.zzddljytxlp3zfii@esperanza> References: <4dfddcb3838385c88cbfdf51d52ef112f56cf130.1528906027.git.vdavydov.dev@gmail.com> <20180627174509.GH28358@chai> <20180628091316.hyytupw22x2pvpcy@esperanza> <20180628102322.GA30029@chai> <20180628103540.h7l22phy5dibcbf3@esperanza> <20180628105422.GC30029@chai> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180628105422.GC30029@chai> To: Konstantin Osipov Cc: tarantool-patches@freelists.org List-ID: On Thu, Jun 28, 2018 at 01:54:22PM +0300, Konstantin Osipov wrote: > * Vladimir Davydov [18/06/28 13:39]: > > On Thu, Jun 28, 2018 at 01:23:22PM +0300, Konstantin Osipov wrote: > > > * Vladimir Davydov [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.