From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-f193.google.com (mail-lj1-f193.google.com [209.85.208.193]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 0B26D43E880 for ; Mon, 23 Mar 2020 19:40:26 +0300 (MSK) Received: by mail-lj1-f193.google.com with SMTP id w1so15332623ljh.5 for ; Mon, 23 Mar 2020 09:40:26 -0700 (PDT) Date: Mon, 23 Mar 2020 19:40:25 +0300 From: Konstantin Osipov Message-ID: <20200323164025.GC5491@atlas> References: <1888c3eba1eb272581916951759ef9ede0a34c07.1584978381.git.sergepetrenko@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1888c3eba1eb272581916951759ef9ede0a34c07.1584978381.git.sergepetrenko@tarantool.org> 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: Serge Petrenko Cc: tarantool-patches@dev.tarantool.org, v.shpilevoy@tarantool.org * Serge Petrenko [20/03/23 19:23]: > + struct vclock min_vclock; > + struct vclock *vclock; > + struct gc_consumer *consumer = gc_tree_first(&gc.consumers); > + if (consumer != NULL) { > + vclock_copy(&min_vclock, &consumer->vclock); > + while ((consumer = gc_tree_next(&gc.consumers, consumer)) != NULL) { > + vclock_min(&min_vclock, &consumer->vclock); > + } > + vclock_min(&min_vclock, &checkpoint->vclock); > + vclock = &min_vclock; > + } else { > + vclock = &checkpoint->vclock; > + } This loop is a total magic to anyone not present at our zoom conversation. Please explain what's going on here in a comment. -- Konstantin Osipov, Moscow, Russia https://scylladb.com