Tarantool development patches archive
 help / color / mirror / Atom feed
From: Serge Petrenko <sergepetrenko@tarantool.org>
To: Vladimir Davydov <vdavydov.dev@gmail.com>
Cc: tarantool-patches@freelists.org,
	Konstantin Osipov <kostja@tarantool.org>
Subject: Re: [tarantool-patches] Re: [PATCH v3 1/3] box: get rid of atexit() for calling cleanup routine
Date: Sat, 29 Dec 2018 16:54:00 +0300	[thread overview]
Message-ID: <5DA4BFB2-06E9-4B2F-8672-A5A745FCDB13@tarantool.org> (raw)
In-Reply-To: <20181228075812.nhtchuubtnxkxyuj@esperanza>

[-- Attachment #1: Type: text/plain, Size: 1996 bytes --]

Hi!
I addressed your comments regarding all the 3 patches and
sent v4 for review («[PATCH v4 0/2] box: implement on_shutdown triggers»)

As for this particular patch, I made it independent from the next one,
so it may be dropped altogether if you wish.

> 28 дек. 2018 г., в 10:58, Vladimir Davydov <vdavydov.dev@gmail.com> написал(а):
> 
> On Fri, Dec 28, 2018 at 10:43:26AM +0300, Konstantin Osipov wrote:
>> * Vladimir Davydov <vdavydov.dev@gmail.com> [18/12/27 16:00]:
>>>>> On Tue, Dec 11, 2018 at 04:24:38PM +0300, Serge Petrenko wrote:
>>>>>> Move a call to tarantool_free() to the end of main().
>>>>>> Also instead of breaking the event loop directly when processing a
>>>>>> signal start a fiber which can do some work before event loop break and
>>>>>> then break the event loop (this will be helpful when on_shutdown
>>>>>> triggers are implemented to run them while ev loop active).
>>>>>> Only wal_thread_stop() is left in atexit() to make sure we close the
>>>>>> journal in case the user exits by typing os.exit() to the console.
>>>>> 
>>>>> I don't understand why you need to do it in the scope of the issue
>>>>> you're intending to fix. You can start a fiber from SITERM/SIGINT signal
>>>>> handler and run on_shutdown triggers from it without atexit rework,
>>>>> right?
>>>> 
>>>> I asked Sergey to refactor our atexit machinery. I want atexit
>>>> handlers to be able to run the event loop, all such handlers, not
>>>> just the exit trigger.
>>> 
>>> But this isn't what this patch does - it just moves some code from
>>> atexit() to the end of main, after the event loop is stopped.
>> 
>> This is OK for existing handlers, since they don't require an
>> event loop today. 
> 
> Then why move them from atexit() to the end of main()? It doesn't
> achieve anything, it doesn't have anything to do with on_shutdown
> trigger. For some reason, we just stop freeing memory if the program
> terminates by exit()-ing.
> 


[-- Attachment #2: Type: text/html, Size: 3137 bytes --]

  reply	other threads:[~2018-12-29 13:54 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-11 13:24 [tarantool-patches] [PATCH v3 0/3] box: implement on_shutdown triggers Serge Petrenko
2018-12-11 13:24 ` [tarantool-patches] [PATCH v3 1/3] box: get rid of atexit() for calling cleanup routine Serge Petrenko
2018-12-27 12:43   ` Vladimir Davydov
2018-12-27 12:50     ` Konstantin Osipov
2018-12-27 12:56       ` Vladimir Davydov
2018-12-28  7:43         ` [tarantool-patches] " Konstantin Osipov
2018-12-28  7:58           ` Vladimir Davydov
2018-12-29 13:54             ` Serge Petrenko [this message]
2018-12-11 13:24 ` [tarantool-patches] [PATCH v3 2/3] box: implement on_shutdown triggers Serge Petrenko
2018-12-27 13:11   ` Vladimir Davydov
2018-12-11 13:24 ` [tarantool-patches] [PATCH v3 3/3] box: introduce on_shutdown triggers to lua Serge Petrenko
2018-12-27 13:14   ` Vladimir Davydov

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=5DA4BFB2-06E9-4B2F-8672-A5A745FCDB13@tarantool.org \
    --to=sergepetrenko@tarantool.org \
    --cc=kostja@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --cc=vdavydov.dev@gmail.com \
    --subject='Re: [tarantool-patches] Re: [PATCH v3 1/3] box: get rid of atexit() for calling cleanup routine' \
    /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