From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp29.i.mail.ru (smtp29.i.mail.ru [94.100.177.89]) (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 6BE8E42EF5C for ; Fri, 19 Jun 2020 20:48:05 +0300 (MSK) References: <3210e1e6f867cfd1c1f65e05f28a32deae63c172.1591701695.git.sergepetrenko@tarantool.org> <769f9c43-0d9e-7a96-275e-69090207ad43@tarantool.org> <773fbe25-b917-709c-902d-ca9e96cd3291@tarantool.org> From: Serge Petrenko Message-ID: Date: Fri, 19 Jun 2020 20:48:04 +0300 MIME-Version: 1.0 In-Reply-To: <773fbe25-b917-709c-902d-ca9e96cd3291@tarantool.org> Content-Type: text/plain; charset="utf-8"; format="flowed" Content-Transfer-Encoding: 8bit Content-Language: ru Subject: Re: [Tarantool-patches] [PATCH 8/8] replication: write and read CONFIRM entries List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Leonid Vasiliev , Vladislav Shpilevoy , sergos@tarantool.org, gorcunov@gmail.com Cc: tarantool-patches@dev.tarantool.org 18.06.2020 14:32, Leonid Vasiliev пишет: > Add commit: > > replication: fix for "replication: write and read CONFIRM entries" > > As I understand it, an entry is deleted in txn_limbo_wait_complete(), > so don't delete it from the queue in txn_limbo_ack(). > > [TO BE SQUASHED INTO THE PREVIOUS COMMIT] > > diff --git a/src/box/txn_limbo.c b/src/box/txn_limbo.c > index 03cbed7..a07ed24 100644 > --- a/src/box/txn_limbo.c > +++ b/src/box/txn_limbo.c > @@ -198,7 +198,7 @@ txn_limbo_ack(struct txn_limbo *limbo, uint32_t > replica_id, int64_t lsn) >         assert(limbo->instance_id != REPLICA_ID_NIL); >         int64_t prev_lsn = vclock_get(&limbo->vclock, replica_id); >         vclock_follow(&limbo->vclock, replica_id, lsn); > -       struct txn_limbo_entry *e, *tmp; > +       struct txn_limbo_entry *e; >         struct txn_limbo_entry *last_quorum = NULL; >         rlist_foreach_entry(e, &limbo->queue, in_queue) { >                 if (e->lsn <= prev_lsn) > @@ -220,8 +220,7 @@ txn_limbo_ack(struct txn_limbo *limbo, uint32_t > replica_id, int64_t lsn) >                  * Wakeup all the entries in direct order as soon >                  * as confirmation message is written to WAL. >                  */ > -               rlist_foreach_entry_safe(e, &limbo->queue, in_queue, > tmp) { > -                       rlist_del_entry(e, in_queue); > +               rlist_foreach_entry(e, &limbo->queue, in_queue) { > fiber_wakeup(e->txn->fiber); >                         if (e == last_quorum) >                                 break; > LGTM. Squashed. -- Serge Petrenko