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 3107E6EC55; Tue, 4 May 2021 19:01:10 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 3107E6EC55 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1620144070; bh=nUagumYwpZ7Oito7fTG8/SSs5YAgXpbtOiG8JNeboZs=; 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=qmbBqeoRZS1oTJAI0b5zcWVUO5BUL0BPmtxH1IVkTSuIaPiSbi1cismfcCFZ8x8dH 4GyliCZcF0opkfSUgtuZzatKvB1s9Ex47VmsF1tAcL9huVjVSQlfxELvMRmIXsOacy 6V5iBdlJhPxlVse2Gkfle3/2KlnTByMrxeWmQ91I= Received: from mail-lj1-f172.google.com (mail-lj1-f172.google.com [209.85.208.172]) (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 673786EC55 for ; Tue, 4 May 2021 19:00:51 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 673786EC55 Received: by mail-lj1-f172.google.com with SMTP id w15so10442566ljo.10 for ; Tue, 04 May 2021 09:00:51 -0700 (PDT) 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=688BlbM2iIPLZ8u/JmMCJpBOMPrioqANtYVBt8RlL6w=; b=cGBxA3AWGV0P9qv1LolmFgStVbH0hH4O6BGJv6ApHQviWw+jzd7uM2yifiouTgfVSc 0XiyyUqvdb7hAzlIlNI/2IMo7W2StbVBJZt4ryDQgEhkGuCF4/dioKXZIgNo97DO+tNa 72GJT0GYR6EJ6klNf1D7XtSMqwZScUvWnx+42ZdPzZHZ86hr2h/2QSC+RqopmcFNyjnk 4ojZDWfW2o5L1bIMV1O5SUh6+2caLHxO+mGs2fqaVIKuEXzSxWnYyIiFaXFUfAvX/Yhd Kk41GvN68v+JPsqcCdoEbDqZwCRp/CShhmNLriVDJ+XJr+FVCWsFG38dRn4Nfkw+39Qc NHlg== X-Gm-Message-State: AOAM530rVmYJdeeVl9rVSD/KRSnNVdEijvp1WCovIBP+h83eYOQNoGx4 NFwSawDkWPL8OCj6+uG3kuuFyKwWiOk= X-Google-Smtp-Source: ABdhPJysTdO9LPGeHmdrmGbj2WrqwDKxXMraffqji3ygMj+c9Cnpm/A4a9F59v205Ij9H7gJiYziXw== X-Received: by 2002:a2e:591:: with SMTP id 139mr18169657ljf.234.1620144050408; Tue, 04 May 2021 09:00:50 -0700 (PDT) Received: from grain.localdomain ([5.18.199.94]) by smtp.gmail.com with ESMTPSA id d25sm299094lfs.235.2021.05.04.09.00.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 May 2021 09:00:49 -0700 (PDT) Received: by grain.localdomain (Postfix, from userid 1000) id 0E1205601F3; Tue, 4 May 2021 18:58:21 +0300 (MSK) To: tml Date: Tue, 4 May 2021 18:58:18 +0300 Message-Id: <20210504155819.290874-10-gorcunov@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210504155819.290874-1-gorcunov@gmail.com> References: <20210504155819.290874-1-gorcunov@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH v3 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 | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/box/wal.c b/src/box/wal.c index 6468df884..fff530a38 100644 --- a/src/box/wal.c +++ b/src/box/wal.c @@ -1009,13 +1009,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); @@ -1254,9 +1255,9 @@ wal_write_async(struct journal *journal, struct journal_entry *entry) * commit a transaction which has seen changes * that will be rolled back. */ - say_error("Aborting transaction %llu during " + say_error("Aborting transaction %lld during " "cascading rollback", - vclock_sum(&writer->vclock)); + (long long)vclock_sum(&writer->vclock)); goto fail; } -- 2.30.2