From: Serge Petrenko via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>,
alexander.turenko@tarantool.org
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH 3/4] feedback_daemon: send feedback on server start
Date: Thu, 8 Apr 2021 16:41:41 +0300 [thread overview]
Message-ID: <c54a0665-0704-0572-45da-ced0a0ddbdd7@tarantool.org> (raw)
In-Reply-To: <226e5b15-049b-38ec-c03a-3af26989fe55@tarantool.org>
05.04.2021 19:11, Vladislav Shpilevoy пишет:
>
> On 05.04.2021 16:05, Serge Petrenko wrote:
>>
>> 05.04.2021 16:18, Vladislav Shpilevoy пишет:
>>> Hi! Thanks for the patch!
>>>
>>> On 02.04.2021 16:58, Serge Petrenko wrote:
>>>> Send the first report as soon as instance's initial configuration
>>>> finishes.
>>>>
>>>> Closes #5750
>>>> ---
>>>> diff --git a/src/box/lua/feedback_daemon.lua b/src/box/lua/feedback_daemon.lua
>>>> index d00eedf39..2ce768642 100644
>>>> --- a/src/box/lua/feedback_daemon.lua
>>>> +++ b/src/box/lua/feedback_daemon.lua
>>>> @@ -345,7 +345,7 @@ local function guard_loop(self)
>>>> while true do
>>>> if get_fiber_id(self.fiber) == 0 then
>>>> - self.fiber = fiber.create(feedback_loop, self)
>>>> + self.fiber = fiber.new(feedback_loop, self)
>>> Why?
>> With fiber.create() feedback daemon proceeds to sending the "initial report" even before
>> lua's box.cfg() exits. This shouldn't break anything, as far as I understand, but
>> `tarantoolctl.test.lua` failed on my machine without this change.
> But box.cfg yields. Does it mean it still ends before box.cfg ends too,
> if box.cfg yields?
Probably, yes.
I reverted this change after all. It didn't help much, and looks like the
problem was deeper than I thought. It wasn't about box.cfg{} exiting too
early. The problem is with some curl initializations on the first ever
request, which happens to be the feedback daemon report.
I worked this around by sleeping for 10 seconds before proceeding
to the dispatch. Fixes tests both locally and in CI.
Please find v2 in your mailbox.
--
Serge Petrenko
next prev parent reply other threads:[~2021-04-08 13:43 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-02 14:57 [Tarantool-patches] [PATCH 0/4] send feedback on tarantool start Serge Petrenko via Tarantool-patches
2021-04-02 14:58 ` [Tarantool-patches] [PATCH 1/4] feedback_daemon: include server uptime in the report Serge Petrenko via Tarantool-patches
2021-04-02 14:58 ` [Tarantool-patches] [PATCH 2/4] feedback_daemon: rename `send_test` to `send` Serge Petrenko via Tarantool-patches
2021-04-02 14:58 ` [Tarantool-patches] [PATCH 3/4] feedback_daemon: send feedback on server start Serge Petrenko via Tarantool-patches
2021-04-05 13:18 ` Vladislav Shpilevoy via Tarantool-patches
2021-04-05 14:05 ` Serge Petrenko via Tarantool-patches
2021-04-05 16:11 ` Vladislav Shpilevoy via Tarantool-patches
2021-04-08 13:41 ` Serge Petrenko via Tarantool-patches [this message]
2021-04-02 14:58 ` [Tarantool-patches] [PATCH 4/4] feedback_daemon: generate report right before sending Serge Petrenko via Tarantool-patches
2021-04-05 14:03 ` Serge Petrenko via Tarantool-patches
2021-04-05 16:23 ` Vladislav Shpilevoy via Tarantool-patches
2021-04-06 8:18 ` 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=c54a0665-0704-0572-45da-ced0a0ddbdd7@tarantool.org \
--to=tarantool-patches@dev.tarantool.org \
--cc=alexander.turenko@tarantool.org \
--cc=sergepetrenko@tarantool.org \
--cc=v.shpilevoy@tarantool.org \
--subject='Re: [Tarantool-patches] [PATCH 3/4] feedback_daemon: send feedback on server start' \
/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