From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtpng1.m.smailru.net (smtpng1.m.smailru.net [94.100.181.251]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 65F3D469719 for ; Wed, 23 Sep 2020 14:12:42 +0300 (MSK) References: <1599560532-27089-1-git-send-email-alyapunov@tarantool.org> <1599560532-27089-13-git-send-email-alyapunov@tarantool.org> <20200915180523.GD23208@tarantool.org> <20200923110719.GC21612@tarantool.org> From: Aleksandr Lyapunov Message-ID: <23c10573-f596-fea7-859a-ecfdf38cdbc6@tarantool.org> Date: Wed, 23 Sep 2020 14:12:41 +0300 MIME-Version: 1.0 In-Reply-To: <20200923110719.GC21612@tarantool.org> Content-Type: text/plain; charset="utf-8"; format="flowed" Content-Transfer-Encoding: 8bit Content-Language: en-US Subject: Re: [Tarantool-patches] [PATCH v4 12/12] txm: add a test List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Nikita Pettik Cc: tarantool-patches@dev.tarantool.org Thanks! Meanwhile I added more tests and comments and fixed a tiny bug: diff --git a/src/box/memtx_tx.c b/src/box/memtx_tx.c index 55748ad..62ddfbe 100644 --- a/src/box/memtx_tx.c +++ b/src/box/memtx_tx.c @@ -808,6 +808,11 @@ memtx_tx_history_rollback_stmt(struct txn_stmt *stmt)         if (stmt->del_story != NULL) {                 struct memtx_story *story = stmt->del_story; +               /** +                * Clear del_story's pointer to the statement. +                * Since the story hold a list of in-progress delete statements, +                * find the stmt in the list and unlink. +                */                 struct txn_stmt **prev = &story->del_stmt;                 while (*prev != stmt) {                         prev = &(*prev)->next_in_del_list; @@ -816,7 +821,7 @@ memtx_tx_history_rollback_stmt(struct txn_stmt *stmt)                 *prev = stmt->next_in_del_list;                 stmt->next_in_del_list = NULL; -               stmt->del_story->del_stmt = NULL; +               /* And vice versa: clear the statement's pointer to story. */                 stmt->del_story = NULL;         }  } On 23.09.2020 14:07, Nikita Pettik wrote: > > Othewise LGTM > >