[Tarantool-patches] [PATCH v2 3/4] wal: wart when trying to write a record with a broken lsn

Vladislav Shpilevoy v.shpilevoy at tarantool.org
Wed Feb 19 00:15:51 MSK 2020


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.


More information about the Tarantool-patches mailing list