push
github
box: fix old tuple format in on_replace trigger on space upgrade Currently format of old tuple in `on_replace` trigger may be in new or old format during space upgrade depending on whether replace is done before or after upgrade cursor. Space upgrade is designed to be instant from user POV: it returns upgraded tuples in `space.get()` for example even if tuple is not upgraded internally. So to make the trigger consistent with overall design let's always return old tuple in new format. The old tuple visible in trigger is set by `memtx_space_replace_tuple()` function. Instead of fixing it let's get rid of it for a few reasons: - The interface is a bit odd. `old_tuple` is compressed and `new_tuple` is not. Also reference for `new_tuple` is taken by the function and is not for `old_tuple`. - With this function we do some a bit heavy actions twice. For example on update we decompress old tuple before update but then decompress it again to set to `stmt->old_tuple` in this function. Closes tarantool/tarantool-ee#1458 NO_TEST=the fix is tested by the test in EE repository NO_CHANGELOG=the changelog will be added in EE repository NO_DOC=bugfix (cherry picked from commit 7a6319528)
70090 of 123603 branches covered (56.71%)
96 of 106 new or added lines in 2 files covered. (90.57%)
66 existing lines in 22 files now uncovered.103369 of 118104 relevant lines covered (87.52%)
1607929.83 hits per line