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 B035C6EC56; Sat, 20 Mar 2021 16:15:28 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org B035C6EC56 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1616246128; bh=12NaApgjB7nrwSOJoUB3jP2dFBBc/4kjwnU3mNIXSGU=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=E7ghWrm1xoxMUk8GXepwhitYV7jjoDQ5sJO3bahn3j3TfCy8a5TpLheig9ts/JSI6 mxD9XJ6G5ou98ZasersGw56jWE4tRZXemVMp8mwCxbKaalx5CIqUMVVM0Bh5FL3X5K owxrNsbgg14BtAWlAqNQ65b5R7X985eckSVm+hsg= Received: from mail-lf1-f41.google.com (mail-lf1-f41.google.com [209.85.167.41]) (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 A587C6EC56 for ; Sat, 20 Mar 2021 16:15:26 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org A587C6EC56 Received: by mail-lf1-f41.google.com with SMTP id n138so14262584lfa.3 for ; Sat, 20 Mar 2021 06:15:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=vLlC+OFYNnFPDLwY3UdbP5HXCgpDFEXKeFSQgoD2dw8=; b=ZqztS54ENONWTNDNqi91l/OsWST7MboZgq2qRgFCVm3hVMcp7DWyx5pXqDkM3Nu4r5 EWkDNOKlPUWtiRvIkRmt9xVumWKyDEwFdXCIFtU7cBFyW6HtM+lt7Gs6jIrVOT3ggWWS 1viBzYdRxEtfUnVqIbhuWNx9u++3V3sZLgNMN20nnwnu8Jb2Y/TuyVqzufGiuMLoLP2x sqvPxqprDCkM33GJJibHXz23+j8QE0fgUqFBQ5rLNoFlf7NMHrqhHSyPFUZ8ZD+ioX1+ Vh00orxL18HDiPjNOJv604Ru4kZzHmuXCerKQ4GknCz9MujO40rq4i8O1cvTzZdPbQRR /Uuw== X-Gm-Message-State: AOAM530sn6UCd1AoRIfw8hueJxe1foxaz/O+tI0Jp/gtN353bzfPyiTj fbpVtbjgLz6XI7JuRwp28yM= X-Google-Smtp-Source: ABdhPJx6vEG3gkSheLnJ888hjKdzTxL7u849uF9WxPxhYCMQqr1hjUm7anmtFQGA27iAty4tVQkgzA== X-Received: by 2002:a19:7f88:: with SMTP id a130mr3493331lfd.412.1616246126176; Sat, 20 Mar 2021 06:15:26 -0700 (PDT) Received: from grain.localdomain ([5.18.171.94]) by smtp.gmail.com with ESMTPSA id z10sm932434lfe.114.2021.03.20.06.15.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 20 Mar 2021 06:15:24 -0700 (PDT) Received: by grain.localdomain (Postfix, from userid 1000) id B9CEB560133; Sat, 20 Mar 2021 16:15:23 +0300 (MSK) To: tml Date: Sat, 20 Mar 2021 16:15:18 +0300 Message-Id: <20210320131521.1249747-1-gorcunov@gmail.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH v2 0/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: Vladislav Shpilevoy , Mons Anderson Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Take a look please. v2: - rebase code to the fresh master branch - keep wal_cleanup_delay option name - pass wal_cleanup_delay as an option to gc_init, so it won't be dependent on cfg engine - add comment about gc_delay_unref in plain bootstrap mode - allow to setup wal_cleanup_delay dynamically - update comment in gc_wait_cleanup and call it conditionally - declare wal_cleanup_delay as a double - rename gc.cleanup_is_paused to gc.is_paused and update output - do not show ref counter in box.info.gc() output - update documentation - move gc_delay_unref inside relay_subscribe call which runs in tx context (instead of relay's context) - update tests: - add a comment why we need a temp space on replica node - use explicit insert/snapshot operations - shrkink the number of insert/snapshot to speedup testing - use "restart" instead of stop/start pair - use wait_log helper instead of own function - add is_paused test issue https://github.com/tarantool/tarantool/issues/5806 branch gorcunov/gh-5806-xlog-gc-2 Cyrill Gorcunov (3): gc/xlog: delay xlog cleanup until relays are subscribed test: add a test for wal_cleanup_delay option test: box-tap/gc -- add test for is_paused field src/box/box.cc | 46 +- src/box/box.h | 1 + src/box/gc.c | 97 ++++- src/box/gc.h | 38 +- src/box/lua/cfg.cc | 9 + src/box/lua/info.c | 4 + src/box/lua/load_cfg.lua | 4 + src/box/relay.cc | 1 + src/box/replication.cc | 2 + test/app-tap/init_script.result | 1 + test/box-tap/gc.test.lua | 3 +- test/box/admin.result | 2 + test/box/cfg.result | 4 + test/replication/gh-5806-master.lua | 8 + test/replication/gh-5806-slave.lua | 8 + test/replication/gh-5806-xlog-cleanup.result | 397 ++++++++++++++++++ .../replication/gh-5806-xlog-cleanup.test.lua | 166 ++++++++ test/unit/snap_quorum_delay.cc | 2 +- 18 files changed, 784 insertions(+), 9 deletions(-) create mode 100644 test/replication/gh-5806-master.lua create mode 100644 test/replication/gh-5806-slave.lua create mode 100644 test/replication/gh-5806-xlog-cleanup.result create mode 100644 test/replication/gh-5806-xlog-cleanup.test.lua base-commit: f4e248c0c13a46beee238fbebc38ef687ef09d02 -- 2.30.2