[RFC PATCH 12/23] vinyl: do not pass region explicitly to write iterator functions

Vladimir Davydov vdavydov.dev at gmail.com
Wed Aug 1 17:14:43 MSK 2018


On Tue, Jul 31, 2018 at 11:38:13PM +0300, Konstantin Osipov wrote:
> * Vladimir Davydov <vdavydov.dev at gmail.com> [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.



More information about the Tarantool-patches mailing list