From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id D9DCD71827; Wed, 24 Feb 2021 18:41:04 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org D9DCD71827 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1614181264; bh=d0U+kc8bzE/KnokNLU6AIwy86OVg5btuOFmn6XvVIx0=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=Y1RAAbSeHC8LWqpQ9QIdL7QaUyrNNjWc9AAwmmLZslOzGo7MpxgdJi1wu4TkFt7B8 sMLdUHJOJaWrmJoMzCPk4D1tCxu74mNR+B5gzyI72HNb5p01yW7Zh4x4JZ7rRLL8qN JSZUk5bze4oeT7TC+5VgFw9gNWNoHU47D+tNsBkU= Received: from mail-lf1-f41.google.com (mail-lf1-f41.google.com [209.85.167.41]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id C76FC71827 for ; Wed, 24 Feb 2021 18:38:17 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org C76FC71827 Received: by mail-lf1-f41.google.com with SMTP id h125so3661519lfd.7 for ; Wed, 24 Feb 2021 07:38:17 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ywViABfDQZdzqO92ReLzMSG/fA60ME5PRxS8yyfc63Q=; b=AiKbz7q1WihYZMeRSRBCLmuKejM8BXN/NmYH7NCe7T4U6DYYUpznEzBA4Bo1LELpYT gDogWLiDEFQty+XJDNeq1tfQhG43TtgVdnYKOH9VSym33EoskvBUFgeTZIdQklPAxa5E FQlSa0f59Lsnmb0jk+djbSLtLZ5dJhizSPCMUMuLy6SYSZ5emUwsr+blStVLd09KTU2a x9/PBShtw3Ilc9kxCXrs4MWPwTOgMQlYsiNlbqe+1YQguFul9WTOWagb2TAEy2LknMWz bnPWdLpf8e9lZdx16t3vqi7mhFKrIfO2JFjnIrAPHDNmfuTJ+rSs+df17nXpaIglWXPm mSZw== X-Gm-Message-State: AOAM532aADvfGqMFnPXUin3VGLFrCn/7cXIHRi2/agg0zzCqGy2qle+C jSzQPZqzUp/4akjkZ0/oQ8t88QUnBRkWAA== X-Google-Smtp-Source: ABdhPJw8DmuIolWj8jW6aRb1nYQ18zPUgTO0krATSk0r7sIOzjKwdLnBegVpRcHksLpupacUeEhVTA== X-Received: by 2002:ac2:4c82:: with SMTP id d2mr20112485lfl.588.1614181096846; Wed, 24 Feb 2021 07:38:16 -0800 (PST) Received: from grain.localdomain ([5.18.171.94]) by smtp.gmail.com with ESMTPSA id u2sm417623lfi.187.2021.02.24.07.38.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Feb 2021 07:38:15 -0800 (PST) Received: by grain.localdomain (Postfix, from userid 1000) id E0286560272; Wed, 24 Feb 2021 18:36:28 +0300 (MSK) To: tml Date: Wed, 24 Feb 2021 18:36:25 +0300 Message-Id: <20210224153626.121506-10-gorcunov@gmail.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210224153626.121506-1-gorcunov@gmail.com> References: <20210222182030.76232-1-gorcunov@gmail.com> <20210224153626.121506-1-gorcunov@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH v2 09/10] wal: fix say_x format X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Cyrill Gorcunov via Tarantool-patches Reply-To: Cyrill Gorcunov Cc: Vladislav Shpilevoy Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" - vclock_get returns int64_t - vclock_sum returns int64_t Part-of #5846 Signed-off-by: Cyrill Gorcunov --- src/box/wal.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/box/wal.c b/src/box/wal.c index 937d47ba9..1c0076f26 100644 --- a/src/box/wal.c +++ b/src/box/wal.c @@ -993,13 +993,14 @@ wal_assign_lsn(struct vclock *vclock_diff, struct vclock *base, int64_t diff = (*row)->lsn - vclock_get(base, (*row)->replica_id); if (diff <= vclock_get(vclock_diff, (*row)->replica_id)) { + int64_t confirmed_lsn = + vclock_get(base, (*row)->replica_id) + + vclock_get(vclock_diff, (*row)->replica_id); say_crit("Attempt to write a broken LSN to WAL:" - " replica id: %d, confirmed lsn: %d," - " new lsn %d", (*row)->replica_id, - vclock_get(base, (*row)->replica_id) + - vclock_get(vclock_diff, - (*row)->replica_id), - (*row)->lsn); + " replica id: %d, confirmed lsn: %lld," + " new lsn %lld", (*row)->replica_id, + (long long)confirmed_lsn, + (long long)(*row)->lsn); assert(false); } else { vclock_follow(vclock_diff, (*row)->replica_id, diff); @@ -1241,7 +1242,7 @@ wal_write_async(struct journal *journal, struct journal_entry *entry) */ say_error("Aborting transaction %llu during " "cascading rollback", - vclock_sum(&writer->vclock)); + (long long)vclock_sum(&writer->vclock)); goto fail; } -- 2.29.2