[PATCH v2 09/14] vinyl: clean up write iterator source destruction

Konstantin Osipov kostja at tarantool.org
Wed Mar 13 15:05:20 MSK 2019


* Vladimir Davydov <vdavydov.dev at gmail.com> [19/03/13 11:58]:
> By convention we have two methods in each write iterator stream
> implementation (including the write iterator itself as it implements
> the interface too): 'stop' and 'close'. The 'stop' method is called
> in a worker thread. It reverses the effect of 'start'. We need it
> unreference all tuples referenced during the iteration (we must do
> it in the worker thread, where the tuples were referenced in the first
> place so as not to unreference tuple formats, see vy_tuple_delete).
> The 'close' method is called from the tx thread to unreference tuple
> formats if necessary and release memory.
> 
> For the write iterator itself we follow this convention. However,
> for individual sources, for vy_slice_stream source to be more exact,
> we do not - the write iterator calls both 'stop' and 'close' from
> its own 'stop method. Let's cleanup this mess and make the write
> iterator follow the convention. We'll need it in the next patch.

OK to push.

 

-- 
Konstantin Osipov, Moscow, Russia, +7 903 626 22 32
http://tarantool.io - www.twitter.com/kostja_osipov



More information about the Tarantool-patches mailing list