vinyl: free region on vylog commit instead of resetting it
region_reset() only frees memory from the last slab. As a result, if a vylog transaction happens to use more than one slab, memory used by vy_log.pool won't be freed, neither will it be reused, i.e. we'll get a memory leak. Fix it by using region_free() instead of region_reset(). It's okay from performance point of view, because vylog transactions are rare events. Note, the master branch isn't affected to this issue, because the vylog memory management was completely reworked there. 2.1 isn't affected either, because there region_reset() was modified to free all slabs. However, rather than backporting any of those commits, I think it's more appropriate to simply use region_free().
Please register or sign in to comment