From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id 2A23A6FC86; Wed, 24 Mar 2021 18:00:38 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 2A23A6FC86 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1616598038; bh=DlIdQPHlA5JuycdVcYOn3LOAE8KXZP/iRD30SK56xGE=; h=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=lViyPKcZ1mMK5zKqvkafFl51TIqrFiXyrK7hLJOMZtUNZ+E2i3n1D7rNY8mW+8nWL he9rLoDdVScGh10Opx1qd9Yfq47W5ikMMd6/EaL/D8mXy/zVq4+y9qFnMFa/E+PG0L MoZLpxwgOGthGcqo1M4rIvF89t2O0+EUXEupl5aY= Received: from mail-lj1-f171.google.com (mail-lj1-f171.google.com [209.85.208.171]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 2DF476FC86 for ; Wed, 24 Mar 2021 18:00:37 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 2DF476FC86 Received: by mail-lj1-f171.google.com with SMTP id f16so30642057ljm.1 for ; Wed, 24 Mar 2021 08:00:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=7Q72Q2tiOkF7jnytc3KMpzEttAqNZOFKbo/G+tETNOU=; b=eVfNCBLyC5jOx75xtVvLPAi+qIFUU+1aRD2rX6aMbejw0VoHnxq2O1YmATMDsWIHo7 oBaT5qmMLk/0BtL+tkLWUNVsAtEm+PYtqjL0Zh6yNWyR9AwmO5BV2WMbNSROjGdNvDfY Q+0OaBbJLwlcj1YDuBGdADXPxJtQdvkDMzSy3Kqvkd2669xBgPm9WLQdOUHQ3RDPkKOn a4dWmjEFubdj/g2IaQfLE8/RLqENas+8AGLXSa2GRclGUoHcYQ3CLsEvAk0ICBz6s7Cc v2BrVkVrjzIfhYyb1tcGy+2M2VKa5eu9a4QJDUhw0ndQkaAoJw+rvbCBP81/D4FK1iu9 Y+8w== X-Gm-Message-State: AOAM530x/86inT1tdyN6RhGj8hS+LfB1W+bJll/HpkDEOLE0rqRrXXkS ij/NCGHFJRW+u/jgPTbplK6zlpnnLmY= X-Google-Smtp-Source: ABdhPJwA80DuHlVHTR3h/+j3wlBrqA2mKk5Ac0LzTpDFFLP4Q4CeLNgew7dgYkbf5jj2wCbkn/fd/w== X-Received: by 2002:a2e:9d14:: with SMTP id t20mr2419764lji.76.1616598035949; Wed, 24 Mar 2021 08:00:35 -0700 (PDT) Received: from grain.localdomain ([5.18.171.94]) by smtp.gmail.com with ESMTPSA id y11sm364008ljc.18.2021.03.24.08.00.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Mar 2021 08:00:34 -0700 (PDT) Received: by grain.localdomain (Postfix, from userid 1000) id 2BFB8560179; Wed, 24 Mar 2021 18:00:34 +0300 (MSK) Date: Wed, 24 Mar 2021 18:00:34 +0300 To: Serge Petrenko Message-ID: References: <20210323154710.1696442-1-gorcunov@gmail.com> <20210323154710.1696442-2-gorcunov@gmail.com> <1498cc0d-1a3a-619b-8cde-d484eca81758@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1498cc0d-1a3a-619b-8cde-d484eca81758@tarantool.org> User-Agent: Mutt/2.0.5 (2021-01-21) Subject: Re: [Tarantool-patches] [PATCH v3 1/3] gc/xlog: delay xlog cleanup until relays are subscribed X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Cyrill Gorcunov via Tarantool-patches Reply-To: Cyrill Gorcunov Cc: tml , Vladislav Shpilevoy Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" On Wed, Mar 24, 2021 at 04:09:56PM +0300, Serge Petrenko wrote: > > void > > box_set_vinyl_memory(void) > > { > > @@ -3000,7 +3032,7 @@ box_cfg_xc(void) > > rmean_box = rmean_new(iproto_type_strs, IPROTO_TYPE_STAT_MAX); > > rmean_error = rmean_new(rmean_error_strings, RMEAN_ERROR_LAST); > > - gc_init(); > > + gc_init(box_check_wal_cleanup_delay()); > > You didn't  put `wal_cleanup_delay` to `dynamic_cfg_skip_at_load`, > and that's correct because we need to disable it if replication_anon is set. > > So wal_cleanup_delay will be reapplied once box_cfg exits. > > I propose to init gc with TIMEOUT_INFINITY then. It'd look simpler than > setting the same value twice IMO. Not sure I follow. You mean the default value in load_cfg.lua? Instead of 4 hours as we have now? > > +void > > +gc_delay_unref(void) > > +{ > > + if (gc.is_paused) { > > + assert(gc.delay_ref > 0); > > + gc.delay_ref--; > > + if (gc.delay_ref == 0) { > > + say_info("wal/engine cleanup is resumed"); > > + gc.is_paused = false; > > + fiber_wakeup(gc.cleanup_fiber); > > I'd move the info message to the cleanup fiber. > You may deduce reason for the resume there: timeout/replicas connected and > print it. > Or don't show reason for resume at all and leave a single info message. OK, will do, thanks!