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 CEDBA6EC63; Sat, 10 Apr 2021 18:04:07 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org CEDBA6EC63 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1618067047; bh=YQZYefuNM2e7nxTilgOvdzyk5xJBP5CC4BH5Ys2bL1s=; h=To:Cc:References:Date:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=yP60wxjvWLuvcz83QT1EcKZEa3eWtsAUqdw7IqGnsLM0Wz7WYszQ540P0fXXZ8h52 2oN+drUm1shbLNZdsZRzyY7iOpS4mbMgqUVb00kFXt7h8J5Zl1/dkmLEejOLsixauo sDIud0x7j7d6I6GYV8h0912yN98KJ0cZzjiig5I4= Received: from smtp40.i.mail.ru (smtp40.i.mail.ru [94.100.177.100]) (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 58E606EC5B for ; Sat, 10 Apr 2021 18:03:49 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 58E606EC5B Received: by smtp40.i.mail.ru with esmtpa (envelope-from ) id 1lVF9I-0003Jd-DT; Sat, 10 Apr 2021 18:03:48 +0300 To: Vladislav Shpilevoy , alexander.turenko@tarantool.org Cc: tarantool-patches@dev.tarantool.org References: Message-ID: <53d1d30d-713a-bd3f-c5e3-a2cf16e90e95@tarantool.org> Date: Sat, 10 Apr 2021 18:03:47 +0300 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-GB X-4EC0790: 2 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD92FFCB8E6708E7480D608FE24BC85426BB1B55F651FED8C70182A05F538085040A7950DB8474594726EC0895592BB11D7AD419D991366C37973D346D7FEC8E1DB X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE76042E2DB3E33BF2BEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006371005780D56A98C20EA1F7E6F0F101C67CDEEF6D7F21E0D1D9295C2E9FA3191EE1B59CA4C82EFA6584B9EB74B180C084CE56DA018B69B0813F6B57BC7E64490618DEB871D839B73339E8FC8737B5C22498CC5112E3E56BCDBCC7F00164DA146DAFE8445B8C89999729449624AB7ADAF37F6B57BC7E64490611E7FA7ABCAF51C92176DF2183F8FC7C0F6FAE79CA2B8C2908941B15DA834481F9449624AB7ADAF37BA3038C0950A5D3613377AFFFEAFD269176DF2183F8FC7C07193FCC94EA775F77B076A6E789B0E97A8DF7F3B2552694A1E7802607F20496D49FD398EE364050FB1593CA6EC85F86D098B145E00970258B3661434B16C20AC78D18283394535A9E827F84554CEF50127C277FBC8AE2E8BA83251EDC214901ED5E8D9A59859A8B60A9A04DE7321024275ECD9A6C639B01B4E70A05D1297E1BBCB5012B2E24CD356 X-B7AD71C0: AC4F5C86D027EB782CDD5689AFBDA7A24209795067102C07E8F7B195E1C9783176DD1F07EE7435D48513B07AB14EF0B5 X-C1DE0DAB: 0D63561A33F958A5C147B5667117BFBFFA9223E49F6E59C7D1D6A0780A9D2493D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA7502E6951B79FF9A3F410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34EC58E35A639A2471876CE6C16450F65039E5FEF4337EE5FFE7B1B17EB741C94B277BEEBC66C96D791D7E09C32AA3244CE53B743858B62486E7FC724DD322616CF165894D92D62706FACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojqcJA+pXcDul4L7AsnMIrZg== X-Mailru-Sender: 583F1D7ACE8F49BDD2846D59FC20E9F8A306FCACB9EBAE0DD579DEF9408065B49F1CCEE0810B5528424AE0EB1F3D1D21E2978F233C3FAE6EE63DB1732555E4A8EE80603BA4A5B0BC112434F685709FCF0DA7A0AF5A3A8387 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v2 4/5] feedback_daemon: generate report right before sending 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 Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" 10.04.2021 00:53, Vladislav Shpilevoy пишет: > Thanks for the patch! > > On 08.04.2021 15:38, Serge Petrenko via Tarantool-patches wrote: >> Feedback daemon used to generate report before waiting (for an hour by >> default) until it's time to send it. Better actualize the reports and >> generate them right when it's time to send them. > Now there is the 10 seconds delay for the first send. Maybe worth > generating the feedback after the sleep on Mac. Sure, thanks for noticing! Incremental diff: ===================================== diff --git a/src/box/lua/feedback_daemon.lua b/src/box/lua/feedback_daemon.lua index 93bbb2a11..64460f5f4 100644 --- a/src/box/lua/feedback_daemon.lua +++ b/src/box/lua/feedback_daemon.lua @@ -338,12 +338,12 @@ local function feedback_loop(self)          if msg == "stop" then              break          end +        if is_first_send then +            fiber.sleep(10) +            is_first_send = nil +        end          local feedback = self:generate_feedback()          if feedback ~= nil then -            if is_first_send then -                fiber.sleep(10) -                is_first_send = nil -            end              pcall(http.post, self.host, json.encode(feedback), {timeout=1})          end      end -- Serge Petrenko