From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-f194.google.com (mail-lj1-f194.google.com [209.85.208.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 07198445325 for ; Tue, 14 Jul 2020 17:45:18 +0300 (MSK) Received: by mail-lj1-f194.google.com with SMTP id s9so23062150ljm.11 for ; Tue, 14 Jul 2020 07:45:18 -0700 (PDT) From: Cyrill Gorcunov Date: Tue, 14 Jul 2020 17:44:39 +0300 Message-Id: <20200714144440.551127-4-gorcunov@gmail.com> In-Reply-To: <20200714144440.551127-1-gorcunov@gmail.com> References: <20200714144440.551127-1-gorcunov@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH 3/4] qsync: txn_limbo_wait_complete -- fix type conversion List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vladislav Shpilevoy Cc: tml In txn_limbo_wait_confirm we already use proper int type (as declared in fiber_cond_wait_timeout) thus lets do the same here. Signed-off-by: Cyrill Gorcunov --- src/box/txn_limbo.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/box/txn_limbo.c b/src/box/txn_limbo.c index 15dbe6515..d5b887d36 100644 --- a/src/box/txn_limbo.c +++ b/src/box/txn_limbo.c @@ -176,12 +176,11 @@ txn_limbo_wait_complete(struct txn_limbo *limbo, struct txn_limbo_entry *entry) double deadline = start_time + replication_synchro_timeout; bool cancellable = fiber_set_cancellable(false); double timeout = deadline - fiber_clock(); - bool timed_out = fiber_cond_wait_timeout(&limbo->wait_cond, - timeout); + int rc = fiber_cond_wait_timeout(&limbo->wait_cond, timeout); fiber_set_cancellable(cancellable); if (txn_limbo_entry_is_complete(entry)) goto complete; - if (timed_out) + if (rc != 0) goto do_rollback; } -- 2.26.2