From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Wed, 1 Aug 2018 17:14:43 +0300 From: Vladimir Davydov Subject: Re: [RFC PATCH 12/23] vinyl: do not pass region explicitly to write iterator functions Message-ID: <20180801141442.726gzc4xonqt2evm@esperanza> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180731203813.GF15235@chai> References: <1542cec64f8dc936a7cf09a33ca3964f1297c3b0.1531065648.git.vdavydov.dev@gmail.com> <20180731203813.GF15235@chai> To: Konstantin Osipov Cc: tarantool-patches@freelists.org List-ID: On Tue, Jul 31, 2018 at 11:38:13PM +0300, Konstantin Osipov wrote: > * Vladimir Davydov [18/07/08 22:53]: > > This is not necessary, as we can use fiber()->gc, as we usually do. > > The reason Vlad is passing it explicitly is that if we plan to > make transactions interactive, we're going to end up with more > than one transaction per fiber. So it really should be tx->gc > (non-existent at the moment), not fiber->gc. > > I think Vlad is passing it around explicitly as a mental note to > self. No, Vlad doesn't have anything to do with this code. It was written by Alex Lyapunov when he rewrote the write iterator. Even when we make the region per tx, we will still use fiber->gc in this function, because it doesn't have anything to do with transaction processing. In fact, it uses fiber->gc as a big stack and cleans it up after it's done. No point in passing it around. > > It's OK to push.