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 10B076EC56; Thu, 18 Mar 2021 10:41:24 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 10B076EC56 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1616053285; bh=+UVh6FsysazTxtxXSBQ+XDRai8+XtcXYnySUVYX3O/0=; 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=AwF6S3ZChPiIuuJwaRHCibeHXbcWmm1caVPB/Y495zOs3IqEHtuq3JlWvsfO/wptE HJRC/4gLF0dcA8XmMl4k/X9pAIqfxDBgThTpgLObUyu1+L4Sbjhz9z9I15hVkFCsOa qqZtIDsf+R7PwW9jIX05LzV4YnxaFRh+8ZyBEGvQ= Received: from mail-lj1-f173.google.com (mail-lj1-f173.google.com [209.85.208.173]) (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 D09D66EC56 for ; Thu, 18 Mar 2021 10:41:23 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org D09D66EC56 Received: by mail-lj1-f173.google.com with SMTP id s17so6314618ljc.5 for ; Thu, 18 Mar 2021 00:41:23 -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:in-reply-to:user-agent; bh=kAxMOhlPeTKmhMKawycN+WhMSEVX0BeYxSBn9tAcN2I=; b=fc007p+doKHxY4GglQNVZ3aFjI2RiI5OyeTDAFeKPNffLaq33/29KTCK7XH70lsfwh ei/Ld8g7jWjIZsXUbYWweYcbSkZJchTUA4VFnpAifAGx3UFcVQKxeLkY6Ahh05pBaLc9 PeaVwsDX31DuW8+jbKCHEZ636mcBJO0K1jqga03H8CwmjG/8ic2Indgkp6njjEw4mK+D q/zaoL0/r6KN+/xlWIo9bAQ74ukprpSg3Pp0acmOwxfzrL60WaFRiJuyQcTkJo0Vd7G7 Yf4LbHHrQF2hYMR9CbVGMY7DTmXT8LEpOlNKUfcYP1acu1LOVU0muNOwCSwvGIe255bN SJ3Q== X-Gm-Message-State: AOAM532lCldoUjMblrokH3wlcIndXLz2KWskFlvn7GYfYNsDmJ+joJIK sjSxslQWRcnSeT0DqMdrU1o= X-Google-Smtp-Source: ABdhPJxEe5v04XlpeNt9/H78hEAZdnTB/3Ny+cJ0njsgMiEB86YZf0Lcd84a6PCU1YIG7EjpuiGkxg== X-Received: by 2002:a2e:919a:: with SMTP id f26mr4642956ljg.508.1616053283341; Thu, 18 Mar 2021 00:41:23 -0700 (PDT) Received: from grain.localdomain ([5.18.171.94]) by smtp.gmail.com with ESMTPSA id j20sm122884lfb.306.2021.03.18.00.41.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Mar 2021 00:41:22 -0700 (PDT) Received: by grain.localdomain (Postfix, from userid 1000) id 7D4DD56016B; Thu, 18 Mar 2021 10:41:21 +0300 (MSK) Date: Thu, 18 Mar 2021 10:41:21 +0300 To: Konstantin Osipov Message-ID: References: <20210317185743.964278-1-gorcunov@gmail.com> <20210317212350.GA224985@starling> <20210318051812.GB224985@starling> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210318051812.GB224985@starling> User-Agent: Mutt/2.0.5 (2021-01-21) Subject: Re: [Tarantool-patches] [RFC] 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: Mons Anderson , tml , Vladislav Shpilevoy Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" On Thu, Mar 18, 2021 at 08:18:12AM +0300, Konstantin Osipov wrote: > > > > > > Should be in 1.10 as well. > > > > Sure, but first I need to be sure if current rfc is acceptable > > in general and I didn't miss something. I suspect we might > > need to extend this code and better to not make some design > > mistakes which gonna be hard to resolve later. I've a test > > case for this simply didn't posted it yet. > > This is a case where a configuration setting would be suitable. I > don't think it's necessary to keep these logs forever by default, > 4-6 hours should be a good default for many setups. Some will set > the default to, say, 5 minutes, essentially to keep the old > behaviour, and some can set it to infinity, to get the current > behaviour of the patch. > > All tarantool setting follow the convention to start from > subsystem name, so it got to be wal_{something}, e.g. > wal_keep_logs Good point, thanks! Kostya, lets clarify some moments: 1) We introduce "wal_keep_logs" option which defines a timeout to kick the cleanup fiber. 2) If node is anonymous replica we simply ignore this option. 3) If this option is set then we have a few subcases: a) The `_cluster` space is not empty thus thus once all replicas are subscribed _before_ the timeout expired we trigger the cleanup fiber since it is safe to process; b) If replicas are not connected and timeout is expired we kick the cleanup fiber; Or you mean to always conside "wal_keep_logs" option and never trigger the cleanup until it get expired?