From: Cyrill Gorcunov via Tarantool-patches <tarantool-patches@dev.tarantool.org> To: Serge Petrenko <sergepetrenko@tarantool.org> Cc: tml <tarantool-patches@dev.tarantool.org>, Vladislav Shpilevoy <v.shpilevoy@tarantool.org> Subject: Re: [Tarantool-patches] [PATCH v3 1/3] gc/xlog: delay xlog cleanup until relays are subscribed Date: Wed, 24 Mar 2021 18:00:34 +0300 [thread overview] Message-ID: <YFtUEtgSuwFAkZrc@grain> (raw) In-Reply-To: <1498cc0d-1a3a-619b-8cde-d484eca81758@tarantool.org> 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!
next prev parent reply other threads:[~2021-03-24 15:00 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-03-23 15:47 [Tarantool-patches] [PATCH v3 0/3] " Cyrill Gorcunov via Tarantool-patches 2021-03-23 15:47 ` [Tarantool-patches] [PATCH v3 1/3] " Cyrill Gorcunov via Tarantool-patches 2021-03-24 13:09 ` Serge Petrenko via Tarantool-patches 2021-03-24 15:00 ` Cyrill Gorcunov via Tarantool-patches [this message] 2021-03-25 7:12 ` Serge Petrenko via Tarantool-patches 2021-03-23 15:47 ` [Tarantool-patches] [PATCH v3 2/3] test: add a test for wal_cleanup_delay option Cyrill Gorcunov via Tarantool-patches 2021-03-24 13:20 ` Serge Petrenko via Tarantool-patches 2021-03-23 15:47 ` [Tarantool-patches] [PATCH v3 3/3] test: box-tap/gc -- add test for is_paused field Cyrill Gorcunov via Tarantool-patches 2021-03-24 13:27 ` Serge Petrenko via Tarantool-patches 2021-03-23 18:33 ` [Tarantool-patches] [PATCH v3 0/3] gc/xlog: delay xlog cleanup until relays are subscribed Cyrill Gorcunov via Tarantool-patches 2021-03-23 19:07 ` Cyrill Gorcunov via Tarantool-patches 2021-03-24 12:47 ` Serge Petrenko via Tarantool-patches 2021-03-24 14:42 ` Cyrill Gorcunov via Tarantool-patches 2021-03-25 7:13 ` Serge Petrenko via Tarantool-patches
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=YFtUEtgSuwFAkZrc@grain \ --to=tarantool-patches@dev.tarantool.org \ --cc=gorcunov@gmail.com \ --cc=sergepetrenko@tarantool.org \ --cc=v.shpilevoy@tarantool.org \ --subject='Re: [Tarantool-patches] [PATCH v3 1/3] gc/xlog: delay xlog cleanup until relays are subscribed' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox