[Tarantool-patches] [PATCH 3/4] feedback_daemon: send feedback on server start

Serge Petrenko sergepetrenko at tarantool.org
Thu Apr 8 16:41:41 MSK 2021



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



More information about the Tarantool-patches mailing list