> Closes #3807
> ---
> Branch:
https://github.com/tarantool/tarantool/tree/i.kosarev/gh-3807-safe-alloc-on-truncation> Issue:
https://github.com/tarantool/tarantool/issues/3807>
> diff --git a/src/box/memtx_space.c b/src/box/memtx_space.c
> index 73b4c450eb..cc431ea816 100644
> --- a/src/box/memtx_space.c
> +++ b/src/box/memtx_space.c
> @@ -327,8 +327,9 @@ memtx_space_execute_replace(struct space *space, struct txn *txn,
> struct memtx_space *memtx_space = (struct memtx_space *)space;
> struct txn_stmt *stmt = txn_current_stmt(txn);
> enum dup_replace_mode mode = dup_replace_mode(request->type);
> - stmt->new_tuple = memtx_tuple_new(space->format, request->tuple,
> - request->tuple_end);
> + stmt->new_tuple = space->format->vtab.tuple_new(space->format,
> + request->tuple,
> + request->tuple_end);
2. Seems like an expensive change. You added +2 pointer
dereferences to a hot path.
Last time when you worked on that I proposed to make space_truncate
use box.begin + quota disable + box_upsert + quota enable + commit.
So there are no yields between quota enable and disable. And no changes
in the code not related to truncation. Why didn't it work?