Tarantool development patches archive
 help / color / mirror / Atom feed
From: Serge Petrenko via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: avtikhon@tarantool.org, kyukhin@tarantool.org
Cc: tarantool-patches@dev.tarantool.org
Subject: [Tarantool-patches] [PATCH 1/3] Revert "feedback_daemon: send feedback on server start"
Date: Wed, 21 Apr 2021 09:31:44 +0300	[thread overview]
Message-ID: <3ec624b87aeb632d2bcbece9f12484cbb3298f43.1618986404.git.sergepetrenko@tarantool.org> (raw)
In-Reply-To: <cover.1618986404.git.sergepetrenko@tarantool.org>

This reverts commit bc15e0f070c89e00cd76b0432d906697aae25202.
---
 src/box/lua/feedback_daemon.lua | 10 ----------
 src/box/lua/load_cfg.lua        | 34 +++++++++++----------------------
 2 files changed, 11 insertions(+), 33 deletions(-)

diff --git a/src/box/lua/feedback_daemon.lua b/src/box/lua/feedback_daemon.lua
index 7a6b0c94c..8953185b2 100644
--- a/src/box/lua/feedback_daemon.lua
+++ b/src/box/lua/feedback_daemon.lua
@@ -328,12 +328,6 @@ local function fill_in_feedback(self, feedback)
     return feedback
 end
 
--- fixme: remove this hack.
--- It's here to prevent too early feedback sending.
--- This leads to problems with thread sanitization after fork() on Mac OS.
--- Google objc_initializeAfterForkError for details.
-local is_first_send = true
-
 local function feedback_loop(self)
     fiber.name(PREFIX, { truncate = true })
 
@@ -343,10 +337,6 @@ 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
             pcall(http.post, self.host, json.encode(feedback), {timeout=1})
diff --git a/src/box/lua/load_cfg.lua b/src/box/lua/load_cfg.lua
index 11fa98586..4df70c210 100644
--- a/src/box/lua/load_cfg.lua
+++ b/src/box/lua/load_cfg.lua
@@ -661,27 +661,6 @@ setmetatable(box, {
      end
 })
 
--- A trigger on initial box.cfg{} call. Used to perform some checks and
--- send feedback report once instance is fully configured.
-local function on_initial_config()
-    -- Check if schema version matches Tarantool version and print
-    -- warning if it's not (in case user forgot to call
-    -- box.schema.upgrade()).
-    local needs, schema_version_str = private.schema_needs_upgrade()
-    if needs then
-        local msg = string.format(
-            'Your schema version is %s while Tarantool %s requires a more'..
-            ' recent schema version. Please, consider using box.'..
-            'schema.upgrade().', schema_version_str, box.info.version)
-        log.warn(msg)
-    end
-
-    -- Send feedback as soon as instance is configured.
-    if private.feedback_daemon ~= nil then
-        private.feedback_daemon.send()
-    end
-end
-
 -- Whether box is loaded.
 --
 -- `false` when box is not configured or when the initialization
@@ -776,8 +755,17 @@ local function load_cfg(cfg)
 
     box_is_configured = true
 
-    on_initial_config()
-
+    -- Check if schema version matches Tarantool version and print
+    -- warning if it's not (in case user forgot to call
+    -- box.schema.upgrade()).
+    local needs, schema_version_str = private.schema_needs_upgrade()
+    if needs then
+        local msg = string.format(
+            'Your schema version is %s while Tarantool %s requires a more'..
+            ' recent schema version. Please, consider using box.'..
+            'schema.upgrade().', schema_version_str, box.info.version)
+        log.warn(msg)
+    end
 end
 box.cfg = locked(load_cfg)
 
-- 
2.24.3 (Apple Git-128)


  reply	other threads:[~2021-04-21  6:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-21  6:31 [Tarantool-patches] [PATCH 0/3] replace feedback send on tarantool start with send after 2 minutes of operation Serge Petrenko via Tarantool-patches
2021-04-21  6:31 ` Serge Petrenko via Tarantool-patches [this message]
2021-04-21  6:31 ` [Tarantool-patches] [PATCH 2/3] feedback_daemon: do not trigger feedback send on first occurred event Serge Petrenko via Tarantool-patches
2021-04-21  6:31 ` [Tarantool-patches] [PATCH 3/3] feedback_daemon: speedup the first send to 2 minutes Serge Petrenko via Tarantool-patches
2021-04-21 10:18 ` [Tarantool-patches] [PATCH 0/3] replace feedback send on tarantool start with send after 2 minutes of operation Kirill Yukhin 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=3ec624b87aeb632d2bcbece9f12484cbb3298f43.1618986404.git.sergepetrenko@tarantool.org \
    --to=tarantool-patches@dev.tarantool.org \
    --cc=avtikhon@tarantool.org \
    --cc=kyukhin@tarantool.org \
    --cc=sergepetrenko@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH 1/3] Revert "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