From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp50.i.mail.ru (smtp50.i.mail.ru [94.100.177.110]) (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 3CA7C45C304 for ; Tue, 9 Jun 2020 15:20:48 +0300 (MSK) From: Serge Petrenko Date: Tue, 9 Jun 2020 15:20:17 +0300 Message-Id: In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH 5/8] txn_limbo: follow-up fixes List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: v.shpilevoy@tarantool.org, sergos@tarantool.org, gorcunov@gmail.com Cc: tarantool-patches@dev.tarantool.org Part-of #4847 Follow-up #4844 Follow-up #4845 --- src/box/txn.c | 5 +++-- src/box/txn_limbo.c | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/box/txn.c b/src/box/txn.c index 1d6518e29..f30e20944 100644 --- a/src/box/txn.c +++ b/src/box/txn.c @@ -459,7 +459,7 @@ txn_complete(struct txn *txn) * back to the fiber, owning the transaction so as * it could decide what to do next. */ - if (txn->fiber != fiber()) + if (txn->fiber != NULL && txn->fiber != fiber()) fiber_wakeup(txn->fiber); return; } @@ -523,7 +523,8 @@ txn_journal_entry_new(struct txn *txn) txn_init_triggers(txn); rlist_splice(&txn->on_commit, &stmt->on_commit); } - is_sync = is_sync || stmt->space->def->opts.is_sync; + is_sync = is_sync || (stmt->space != NULL && + stmt->space->def->opts.is_sync); /* A read (e.g. select) request */ if (stmt->row == NULL) diff --git a/src/box/txn_limbo.c b/src/box/txn_limbo.c index d28b2a28b..47c1bd249 100644 --- a/src/box/txn_limbo.c +++ b/src/box/txn_limbo.c @@ -108,7 +108,7 @@ txn_limbo_check_complete(struct txn_limbo *limbo, struct txn_limbo_entry *entry) ack_count += vc.lsn >= lsn; assert(ack_count >= entry->ack_count); entry->ack_count = ack_count; - entry->is_commit = ack_count > replication_sync_quorum; + entry->is_commit = ack_count >= replication_sync_quorum; return entry->is_commit; } -- 2.24.3 (Apple Git-128)