From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp50.i.mail.ru (smtp50.i.mail.ru [94.100.177.110]) (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 4135D43E89B for ; Fri, 27 Mar 2020 13:24:12 +0300 (MSK) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3608.40.2.2.4\)) From: Serge Petrenko In-Reply-To: <20200323164025.GC5491@atlas> Date: Fri, 27 Mar 2020 13:24:11 +0300 Content-Transfer-Encoding: quoted-printable Message-Id: References: <1888c3eba1eb272581916951759ef9ede0a34c07.1584978381.git.sergepetrenko@tarantool.org> <20200323164025.GC5491@atlas> Subject: Re: [Tarantool-patches] [PATCH v3 2/4] gc: rely on minimal vclock components instead of signatures List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Konstantin Osipov Cc: tarantool-patches@dev.tarantool.org, Vladislav Shpilevoy > 23 =D0=BC=D0=B0=D1=80=D1=82=D0=B0 2020 =D0=B3., =D0=B2 19:40, = Konstantin Osipov =D0=BD=D0=B0=D0=BF=D0=B8=D1=81= =D0=B0=D0=BB(=D0=B0): >=20 > * Serge Petrenko [20/03/23 19:23]: >> + struct vclock min_vclock; >> + struct vclock *vclock; >> + struct gc_consumer *consumer =3D gc_tree_first(&gc.consumers); >> + if (consumer !=3D NULL) { >> + vclock_copy(&min_vclock, &consumer->vclock); >> + while ((consumer =3D gc_tree_next(&gc.consumers, = consumer)) !=3D NULL) { >> + vclock_min(&min_vclock, &consumer->vclock); >> + } >> + vclock_min(&min_vclock, &checkpoint->vclock); >> + vclock =3D &min_vclock; >> + } else { >> + vclock =3D &checkpoint->vclock; >> + } >=20 > This loop is a total magic to anyone not present at our zoom > conversation. Please explain what's going on here in a comment. Added a comment. >=20 >=20 >=20 > --=20 > Konstantin Osipov, Moscow, Russia > https://scylladb.com -- Serge Petrenko sergepetrenko@tarantool.org