txm: change tuple ownership strategy
Since a space holds pointers to tuples it must increment reference counters of its tuples and must decrement counters of tuples that are deleted from the space. Memtx TX manager also holds references to processing tuples in the same way. Before this patch there was a logic: while a tuple is dirty it belongs to TX manager and does not belong to the space. Only when a tuple is cleared and it is still in space it will be referenced by space. That logic leads to crashes in some DDL requests since they works with indexes directly. For example deleting an index causes dereferencing of all its tuples - even dirty. This patch changes the logic. Now all tuples that are physically in the primary index of the space a referenced. Once removed from primary index - the tuple is dereferenced. TX manager references tuples like before - every holding tuple is referenced. Part of #5628
Loading
Please register or sign in to comment