[tarantool-patches] Re: [PATCH v2 2/2] Track wal vclock changes instead of copying
kostja at tarantool.org
Thu Feb 14 13:31:14 MSK 2019
* Georgy Kirichenko <georgy at 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
More information about the Tarantool-patches