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 1CD276FC8F; Thu, 25 Mar 2021 10:13:04 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 1CD276FC8F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1616656384; bh=kqzeOd9rhQolw8Tm3NxUXbtIc1KNLbuUbRTkh/91g9E=; h=To:References:Date:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=JOOSFYP3UDJrZW5iKOarl3/iLdaNsfvJgyFE2u/SWztLBx3qfNcSdZAN1qQ3QrMZy Od+YfHqTocWYJBeJLplZ8x1ho2pFl8zX2pU1LoOi+bNxXkUUsCcMxzuVf6d4H+vYS5 uGjD7qqv5+ound7wQm+8SNZZY1Zrmyh43cAGEteo= Received: from smtp58.i.mail.ru (smtp58.i.mail.ru [217.69.128.38]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 881596FC8F for ; Thu, 25 Mar 2021 10:13:02 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 881596FC8F Received: by smtp58.i.mail.ru with esmtpa (envelope-from ) id 1lPKAu-00050F-6M; Thu, 25 Mar 2021 10:13:00 +0300 To: Cyrill Gorcunov References: <20210323154710.1696442-1-gorcunov@gmail.com> <20210323154710.1696442-2-gorcunov@gmail.com> <1498cc0d-1a3a-619b-8cde-d484eca81758@tarantool.org> Message-ID: <57408c94-4fad-9e64-76af-5bcc905d9fb6@tarantool.org> Date: Thu, 25 Mar 2021 10:12:59 +0300 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: ru X-7564579A: EEAE043A70213CC8 X-77F55803: 4F1203BC0FB41BD9064ADF4728AA0EE9587C800CEAD38A69F042767B24605C2B182A05F5380850409F6933482DF1790A13C2AFD01C879BE1F29BA40A123DCBD9E51A3EBD890AA69A X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE79D9C320A40CA82D4EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F790063790B55F3E386DB9B28638F802B75D45FF914D58D5BE9E6BC131B5C99E7648C95C5DD32608FC869F5D3C92F9E5A591BEA3DE400D90C82AE355A471835C12D1D9774AD6D5ED66289B5278DA827A17800CE7A29E2F051442AF778941B15DA834481FCF19DD082D7633A0EF3E4896CB9E6436389733CBF5DBD5E9D5E8D9A59859A8B6EC9D17400D464069CC7F00164DA146DA6F5DAA56C3B73B237318B6A418E8EAB86D1867E19FE14079C09775C1D3CA48CF3D321E7403792E34F43C7A68FF626056395957E7521B51C29E9CE733340B9D5F68655334FD4449CB9ECD01F8117BC8BEE2021AF6380DFAD19449624AB7ADAF3735872C767BF85DA29E625A9149C048EE0A3850AC1BE2E735BCC85A78740017694AD6D5ED66289B524E70A05D1297E1BB35872C767BF85DA227C277FBC8AE2E8B4CA51AC27BCFA11175ECD9A6C639B01B4E70A05D1297E1BBC6867C52282FAC85D9B7C4F32B44FF57285124B2A10EEC6C00306258E7E6ABB4E4A6367B16DE6309 X-C1DE0DAB: 0D63561A33F958A5FCE1DCDFE2BAF1D8CF134B65FECDB6783D64ED9AC4200B26D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA75F04B387B5D7535DE410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D3430FC2BC1B917F01845E155E15583D074075B133D0D19C507EA10C2B58D4C41356B930017DB61A2B51D7E09C32AA3244C5CA0918FF57B282BA77CD99B7B726528853296C06374E602927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojjqzNotmU+gfZdzu+sCT+Aw== X-Mailru-Sender: 3B9A0136629DC9125D61937A2360A44617765E10154E2821D287F81A556BF3F690DD6BBA4EE1DFCA424AE0EB1F3D1D21E2978F233C3FAE6EE63DB1732555E4A8EE80603BA4A5B0BC112434F685709FCF0DA7A0AF5A3A8387 X-Mras: Ok 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: Serge Petrenko via Tarantool-patches Reply-To: Serge Petrenko Cc: tml , Vladislav Shpilevoy Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" 24.03.2021 18:00, Cyrill Gorcunov пишет: > 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? No, leave  the default value as is, but do not fetch it for gc_init. Init gc with TIMEOUT_INFINITY. The default (or user-provided) value will be applied later from `load_cfg()` anyway > >>> +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! -- Serge Petrenko