vinyl: zap vy_mem_update_formats() + cleanup
vy_mem_update_formats() is used to update mem formats when mem rotation is skipped, because the mem is empty. This doesn't work as expected, because vy_mem_update_formats() does not update mem->sc_version, so that in case of ddl the next insertion will rotate it anyway. Instead of updating sc_version in vy_mem_update_formats(), let's fix this by zapping the helper altogether and simply recreating mem - it isn't a big deal, because this does not happen often. While we are at it, let's also: - reorder arguments of vy_mem_new() to keep key_def close to format - remove extra arguments of vy_range_rotate_mem() - we can get all of them right there (in fact we already do in case of ->format).
Showing
- src/box/vinyl.c 21 additions, 27 deletionssrc/box/vinyl.c
- src/box/vy_mem.c 2 additions, 2 deletionssrc/box/vy_mem.c
- src/box/vy_mem.h 3 additions, 17 deletionssrc/box/vy_mem.h
- test/vinyl/quota.result 1 addition, 1 deletiontest/vinyl/quota.result
- test/vinyl/upsert.result 7 additions, 6 deletionstest/vinyl/upsert.result
- test/vinyl/upsert.test.lua 1 addition, 1 deletiontest/vinyl/upsert.test.lua
Loading
Please register or sign in to comment