From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp47.i.mail.ru (smtp47.i.mail.ru [94.100.177.107]) (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 58A9B469719 for ; Wed, 19 Feb 2020 00:15:54 +0300 (MSK) References: <97f37279955ebc29e899164cc1364e6a0aea0f9b.1581630406.git.sergepetrenko@tarantool.org> From: Vladislav Shpilevoy Message-ID: <716db588-d891-7985-a6d8-024f3902a22f@tarantool.org> Date: Tue, 18 Feb 2020 22:15:51 +0100 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [Tarantool-patches] [PATCH v2 3/4] wal: wart when trying to write a record with a broken lsn List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Serge Petrenko , Alexander Turenko , Konstantin Osipov Cc: tarantool-patches@dev.tarantool.org Hi! Thanks for the fixes! > diff --git a/src/box/wal.c b/src/box/wal.c > index f8ee2b7d8..a87aedf1d 100644 > --- a/src/box/wal.c > +++ b/src/box/wal.c > @@ -955,14 +955,16 @@ wal_assign_lsn(struct vclock *vclock_diff, struct vclock *base, >  if (diff <= vclock_get(vclock_diff, >         (*row)->replica_id)) { >  say_crit("Attempt to write a broken LSN to WAL:" > - " replica id: %d, committed lsn: %d," > + " 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); > +assert(0); Ok. Lets then use assert(false) at least. We don't normally use integers as booleans.