From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-f47.google.com (mail-lf1-f47.google.com [209.85.167.47]) (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 DF2FB441840 for ; Mon, 30 Mar 2020 15:54:49 +0300 (MSK) Received: by mail-lf1-f47.google.com with SMTP id q5so14027345lfb.13 for ; Mon, 30 Mar 2020 05:54:49 -0700 (PDT) Date: Mon, 30 Mar 2020 15:54:47 +0300 From: Konstantin Osipov Message-ID: <20200330125447.GB17886@atlas> References: <20200328060352.GB23207@atlas> <1ACFD89D-9FB2-4BA1-A577-6EE741783FA9@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1ACFD89D-9FB2-4BA1-A577-6EE741783FA9@tarantool.org> Subject: Re: [Tarantool-patches] [PATCH v4 3/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, Vladislav Shpilevoy * Serge Petrenko [20/03/30 14:03]: > >> + while (consumer != NULL) { > >> + /* > >> + * Consumers will never need rows signed > >> + * with a zero instance id (local rows). > >> + */ > >> + vclock_min_ignore0(&min_vclock, &consumer->vclock); > >> + consumer = gc_tree_next(&gc.consumers, consumer); > >> + } > >> + > >> + if (vclock_sum(&min_vclock) > vclock_sum(&gc.vclock)) { > > > > Please use vclock_sum_ignore0 > >> + vclock_copy(&gc.vclock, &min_vclock); > > > > Please use vclock_copy_ignore0 > > I can’t. wal_collect_garbage() searches for the wal file with vclock > strictly less than or equal to the one provided, so 0-th clock > component cannot be zeroed out, otherwise no logs will ever be deleted. > While all the other components are taken as a minimum between all > consumers and the oldest snapshot, the 0-th component is copied directly > from the oldest snapshot, since we have to keep all WALs starting from the > oldest snapshot. It is stated in the comment a few lines above. Now i moved > it to a more relevant place. Wow. Please add a comment and resend an updated patch so that I can check/lgtm it. -- Konstantin Osipov, Moscow, Russia https://scylladb.com