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 3F5CB7030F; Thu, 25 Feb 2021 01:41:25 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 3F5CB7030F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1614206485; bh=rAGZ1UGz/jUSlOUQ0XGE6uO+tyylu47zuw2frolnJMQ=; h=To:References:Date:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=SVOi7FcbMLVrA6FV3pD5yUPAFzufATcyfn5qNWkcT7mkbb7taK5489fW/3kI885K9 VJpVw5MDKrjPI8SrfQ3f6XmukD+VkSaaJ5Obmqhcn4wtZ/ywV3vbEsXuVQyGggLu92 FyKZuSjfEJjdaszyHpH7z1kfDXPJz5jYd/phNjAs= Received: from smtp63.i.mail.ru (smtp63.i.mail.ru [217.69.128.43]) (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 AD11F7030F for ; Thu, 25 Feb 2021 01:41:19 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org AD11F7030F Received: by smtp63.i.mail.ru with esmtpa (envelope-from ) id 1lF2qN-0007xb-7F; Thu, 25 Feb 2021 01:41:19 +0300 To: Cyrill Gorcunov , tml References: <20210222182030.76232-1-gorcunov@gmail.com> <20210224153626.121506-1-gorcunov@gmail.com> <20210224153626.121506-10-gorcunov@gmail.com> Message-ID: Date: Wed, 24 Feb 2021 23:41:18 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: <20210224153626.121506-10-gorcunov@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD975C3EC174F5669229511437AA01F46811CFCF616A939B362182A05F5380850405039A8AA14F6E9990CBBE4B9FD87719B430CB6023DA60248637D4B722BA2E63F X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE745C0EDBD94D46193EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637AC18FED211962C318638F802B75D45FF914D58D5BE9E6BC131B5C99E7648C95CDDE882590F889B1C5EE27897EFFEC74D73C2DA8971526C19A471835C12D1D9774AD6D5ED66289B5278DA827A17800CE77E7E81EEA8A9722B8941B15DA834481FCF19DD082D7633A0EF3E4896CB9E6436389733CBF5DBD5E9D5E8D9A59859A8B6D99FB7B2A39B4961CC7F00164DA146DA6F5DAA56C3B73B237318B6A418E8EAB8D32BA5DBAC0009BE9E8FC8737B5C2249D6228862F0BD2A6376E601842F6C81A12EF20D2F80756B5F7E9C4E3C761E06A776E601842F6C81A127C277FBC8AE2E8B2FDB85147E01274B3AA81AA40904B5D9DBF02ECDB25306B2B25CBF701D1BE8734AD6D5ED66289B5278DA827A17800CE7B2B7C64F398C741067F23339F89546C5A8DF7F3B2552694A6FED454B719173D6725E5C173C3A84C3E2C51E5CF308F7B035872C767BF85DA2F004C906525384306FED454B719173D6462275124DF8B9C9AE7E30DF62CE24E4E5BFE6E7EFDEDCD789D4C264860C145E X-B7AD71C0: 6FEFE4C63DFE2D85469AD6E133326EAB664F5199923B286E81C2AD9CFA0FBF5C9C2BBA594F31363B5803BE1F3B17DC36E8F7B195E1C978314867C7703A3B6B799BB839037DF3A6B5 X-C1DE0DAB: 0D63561A33F958A5584E9C2D8A551947734817C2FFE1BFB502DC7202DFBD091BD59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA75968C9853642EB7C3410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34728AF701C68E45396A05ABCCE9CC8C5BA77E0AE8107B4AA0C65A193FB356EC280FC170BBE4E1EDCE1D7E09C32AA3244C0029AAC76361AA929DF564565FEAE72435DA7DC5AF9B58C0729B2BEF169E0186 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojvz1c9SWJtj/l7O17uxC0Cg== X-Mailru-Sender: 504CC1E875BF3E7D9BC0E5172ADA31106A35B9DDC05972B50FA29097FCA232575CB5BB9D30C73F4B07784C02288277CA03E0582D3806FB6A5317862B1921BA260ED6CFD6382C13A6112434F685709FCF0DA7A0AF5A3A8387 X-Mras: Ok Subject: Re: [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: Vladislav Shpilevoy via Tarantool-patches Reply-To: Vladislav Shpilevoy Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Thanks for the patch! On 24.02.2021 16:36, Cyrill Gorcunov via Tarantool-patches wrote: > - 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," `replica_id` is uint32_t. So it should be %u and cast to (unsigned) I suppose. > + " 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)); Long long should use %lld, not %llu. I have no idea why is the format checker silent about this.