Tarantool development patches archive
 help / color / mirror / Atom feed
From: Konstantin Osipov <kostja@tarantool.org>
To: tarantool-patches@freelists.org
Cc: Georgy Kirichenko <georgy@tarantool.org>
Subject: [tarantool-patches] Re: [PATCH v2 2/2] Track wal vclock changes instead of copying
Date: Thu, 14 Feb 2019 13:31:14 +0300	[thread overview]
Message-ID: <20190214103114.GC30749@chai> (raw)
In-Reply-To: <9b0d551519dd24f3c456fc28e512e26e953275fc.1550046797.git.georgy@tarantool.org>

* Georgy Kirichenko <georgy@tarantool.org> [19/02/13 11:54]:
> Spare some vclock_copy invocations because they could be expensive.

OK to push.
> +static inline void
> +vclock_merge(struct vclock *dst, struct vclock *diff)
> +{
> +	struct vclock_iterator it;
> +	vclock_iterator_init(&it, diff);
> +	vclock_foreach(&it, item)
> +		vclock_follow(dst, item.id, vclock_get(dst, item.id) + item.lsn);
> +	vclock_create(diff);
> +}

I agree with the approach since in most cases you're going to have
just one component in vclock_diff, so this approach is not going
to depend on the size of vclock (VCLOCK_MAX).

Thank you for following up on this.


-- 
Konstantin Osipov, Moscow, Russia, +7 903 626 22 32
http://tarantool.io - www.twitter.com/kostja_osipov

  reply	other threads:[~2019-02-14 10:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-13  8:35 [tarantool-patches] [PATCH v2 0/2] Reduce wal vclock handling complecity Georgy Kirichenko
2019-02-13  8:35 ` [tarantool-patches] [PATCH v2 1/2] Lightweight vclock_create and vclock_copy Georgy Kirichenko
2019-02-14 10:26   ` [tarantool-patches] " Konstantin Osipov
2019-02-13  8:35 ` [tarantool-patches] [PATCH v2 2/2] Track wal vclock changes instead of copying Georgy Kirichenko
2019-02-14 10:31   ` Konstantin Osipov [this message]
2019-02-14 14:04   ` Vladimir Davydov
2019-02-14 14:42 ` [tarantool-patches] [PATCH v2 0/2] Reduce wal vclock handling complecity Vladimir Davydov

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=20190214103114.GC30749@chai \
    --to=kostja@tarantool.org \
    --cc=georgy@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --subject='[tarantool-patches] Re: [PATCH v2 2/2] Track wal vclock changes instead of copying' \
    /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