vinyl: clean up write iterator source destruction
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.
Loading
Please register or sign in to comment