Tarantool development patches archive
 help / color / mirror / Atom feed
From: Vladimir Davydov <vdavydov.dev@gmail.com>
To: tarantool-patches@freelists.org
Subject: Re: [PATCH] vclock: fix big lsn handling
Date: Thu, 7 Mar 2019 19:11:37 +0300	[thread overview]
Message-ID: <20190307161137.y32tybenkuijlv55@esperanza> (raw)
In-Reply-To: <aff7ea38c32eabde83a08ccea4c07222b2e32928.1551970687.git.vdavydov.dev@gmail.com>

On Thu, Mar 07, 2019 at 05:58:58PM +0300, Vladimir Davydov wrote:
> Fixes commit 8031071efa94 ("Lightweight vclock_create and vclock_copy").
> 
> Closes #4033
> ---
> https://github.com/tarantool/tarantool/issues/4033
> https://github.com/tarantool/tarantool/commits/dv/gh-4033-fix-crash-on-big-lsn
> 
>  src/box/vclock.h             |  2 +-
>  test/xlog-py/big_lsn.result  | 29 +++++++++++++++++++++++++++++
>  test/xlog-py/big_lsn.test.py | 39 +++++++++++++++++++++++++++++++++++++++
>  3 files changed, 69 insertions(+), 1 deletion(-)
>  create mode 100644 test/xlog-py/big_lsn.result
>  create mode 100644 test/xlog-py/big_lsn.test.py
> 
> diff --git a/src/box/vclock.h b/src/box/vclock.h
> index 1a174c1e..f9633ac9 100644
> --- a/src/box/vclock.h
> +++ b/src/box/vclock.h
> @@ -165,7 +165,7 @@ vclock_get(const struct vclock *vclock, uint32_t replica_id)
>  	 */
>  	replica_id &= VCLOCK_MAX - 1;
>  	/* Evaluate a bitmask to avoid branching. */
> -	int64_t mask = 0 - ((vclock->map >> replica_id) & 0x1);
> +	int64_t mask = 0ULL - ((vclock->map >> replica_id) & 0x1);
>  	return mask & vclock->lsn[replica_id];
>  }

Trivial. Pushed to 2.1 and 1.10.

      reply	other threads:[~2019-03-07 16:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-07 14:58 Vladimir Davydov
2019-03-07 16:11 ` Vladimir Davydov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190307161137.y32tybenkuijlv55@esperanza \
    --to=vdavydov.dev@gmail.com \
    --cc=tarantool-patches@freelists.org \
    --subject='Re: [PATCH] vclock: fix big lsn handling' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox