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 C02E66EC5F; Wed, 21 Apr 2021 09:33:21 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org C02E66EC5F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1618986801; bh=3BbLGwXZdIuT1D/WIVqDRkB0aQkP3445vbFgNuJb3CA=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=SQ2KjeMVvCSGbGMt28kUzf4GS/e8Txsp0L5EPPLlDXkcpw0kpxEY9HVR7oQAVd/PQ 1dBn+yM9H0ofzWMSlcJROpgLHXRizW63sq/BvhuecJNOyshxbqcCqCywtsv8jv9llq HZlWcdchIQgp2sD/XMKyaRPSaxAi/8h+OIScaJIs= Received: from smtp38.i.mail.ru (smtp38.i.mail.ru [94.100.177.98]) (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 093FF6FC8C for ; Wed, 21 Apr 2021 09:31:53 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 093FF6FC8C Received: by smtp38.i.mail.ru with esmtpa (envelope-from ) id 1lZ6Ot-0003Ot-U7; Wed, 21 Apr 2021 09:31:52 +0300 To: avtikhon@tarantool.org, kyukhin@tarantool.org Date: Wed, 21 Apr 2021 09:31:46 +0300 Message-Id: <843fa23e74178b5eb1519e78cff36bad88b03587.1618986404.git.sergepetrenko@tarantool.org> X-Mailer: git-send-email 2.24.3 (Apple Git-128) In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD92FFCB8E6708E7480BE79914FF86F9151AC38CC435EA4A654182A05F53808504017C5C11BE0ABF79677E04E7BB599C25206FA01B1F561D7A4AE66B1423D383177 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7AB5815F4DE05345AEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637CF05F7050DCA185A8638F802B75D45FF914D58D5BE9E6BC1A93B80C6DEB9DEE97C6FB206A91F05B2EE1AA7351DA30A8AF9E7900E59C4C89728451B159A507268D2E47CDBA5A96583C09775C1D3CA48CF7EF884183F8E4D67117882F4460429724CE54428C33FAD30A8DF7F3B2552694AC26CFBAC0749D213D2E47CDBA5A9658378DA827A17800CE709B92020B71E24959FA2833FD35BB23DF004C90652538430302FCEF25BFAB3454AD6D5ED66289B5278DA827A17800CE731DB45BFE237DA1FD32BA5DBAC0009BE395957E7521B51C20BC6067A898B09E4090A508E0FED6299176DF2183F8FC7C08B62274D4421ED34CD04E86FAF290E2D7E9C4E3C761E06A71DD303D21008E29813377AFFFEAFD269A417C69337E82CC2E827F84554CEF50127C277FBC8AE2E8BA83251EDC214901ED5E8D9A59859A8B6753C3A5E0A5AB5B7089D37D7C0E48F6C5571747095F342E88FB05168BE4CE3AF X-C1DE0DAB: C20DE7B7AB408E4181F030C43753B8186998911F362727C414F749A5E30D975C3E7AEEB2EA3DACB3A9A3F8854298AB771A13EA9F5B997D6A9C2B6934AE262D3EE7EAB7254005DCED7532B743992DF240BDC6A1CF3F042BAD6DF99611D93F60EF0417BEADF48D1460699F904B3F4130E343918A1A30D5E7FCCB5012B2E24CD356 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34351729636A02D1DE6F21D5B21FC681185AD5CE49CBBF2C9A95739B8BCE8620525FE18ECBF7C99C411D7E09C32AA3244CA652AEF6DAECF016D0AFD8F75CB868B9F94338140B71B8EE927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojlPRl29Bx4WEh0kdy1F8a5Q== X-Mailru-Sender: 583F1D7ACE8F49BDD2846D59FC20E9F8F6D91C620C29244D3B06275BDDA472BD314AD03096449088424AE0EB1F3D1D21E2978F233C3FAE6EE63DB1732555E4A8EE80603BA4A5B0BC112434F685709FCF0DA7A0AF5A3A8387 X-Mras: Ok Subject: [Tarantool-patches] [PATCH 3/3] feedback_daemon: speedup the first send to 2 minutes 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 Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" The first send should happen sooner, than default feedback interval, to catch not so long-living instances. This replaces the commit we had with sending feedback right from initial box.cfg{} and on first event appearance, such as creation/drop of a space or index. The reason for this commit instead of "send feedback on server start", is that the latter one was quite hacky and didn't work correctly without some ugly crutches, namely, fiber.sleep(10) in feedback daemon code. Follow-up #5750 --- src/box/lua/feedback_daemon.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/box/lua/feedback_daemon.lua b/src/box/lua/feedback_daemon.lua index 239af5fda..e1263866a 100644 --- a/src/box/lua/feedback_daemon.lua +++ b/src/box/lua/feedback_daemon.lua @@ -330,9 +330,12 @@ end local function feedback_loop(self) fiber.name(PREFIX, { truncate = true }) + -- Speed up the first send. + local send_timeout = math.min(120, self.interval) while true do - local msg = self.control:get(self.interval) + local msg = self.control:get(send_timeout) + send_timeout = self.interval -- if msg == "send" then we simply send feedback if msg == "stop" then break -- 2.24.3 (Apple Git-128)