Tarantool development patches archive
 help / color / mirror / Atom feed
From: Serge Petrenko <sergepetrenko@tarantool.org>
To: vdavydov.dev@gmail.com
Cc: georgy@tarantool.org, tarantool-patches@freelists.org,
	Serge Petrenko <sergepetrenko@tarantool.org>
Subject: [PATCH v2 2/2] box: set readahead before replicaset sync
Date: Thu, 21 Feb 2019 21:02:36 +0300	[thread overview]
Message-ID: <816fa321bb9001160233eafa3a052959a62788e1.1550771940.git.sergepetrenko@tarantool.org> (raw)
In-Reply-To: <cover.1550771940.git.sergepetrenko@tarantool.org>
In-Reply-To: <cover.1550771940.git.sergepetrenko@tarantool.org>

Previously readahead was set after the instance synced with all existing
masters. This could lead to a case when some client connections created
rather early would start with default readahead value even when
it was explicitly set to some value.
So, start setting readahead before replicaset sync.

Follow-up: #3958
---
 src/box/box.cc           | 1 +
 src/box/lua/load_cfg.lua | 1 +
 2 files changed, 2 insertions(+)

diff --git a/src/box/box.cc b/src/box/box.cc
index a3d708fc9..cf2254d0c 100644
--- a/src/box/box.cc
+++ b/src/box/box.cc
@@ -2122,6 +2122,7 @@ box_cfg_xc(void)
 	box_check_replicaset_uuid(&replicaset_uuid);
 
 	box_set_net_msg_max();
+	box_set_readahead();
 	box_set_too_long_threshold();
 	box_set_replication_timeout();
 	box_set_replication_connect_timeout();
diff --git a/src/box/lua/load_cfg.lua b/src/box/lua/load_cfg.lua
index fc4e560d9..6c9a82042 100644
--- a/src/box/lua/load_cfg.lua
+++ b/src/box/lua/load_cfg.lua
@@ -274,6 +274,7 @@ local dynamic_cfg_skip_at_load = {
     instance_uuid           = true,
     replicaset_uuid         = true,
     net_msg_max             = true,
+    readahead               = true,
 }
 
 local function convert_gb(size)
-- 
2.17.2 (Apple Git-113)

  parent reply	other threads:[~2019-02-21 18:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-21 18:02 [PATCH v2 0/2] iproto: update readahead in existing connections Serge Petrenko
2019-02-21 18:02 ` [PATCH v2 1/2] " Serge Petrenko
2019-02-25  8:40   ` Vladimir Davydov
2019-02-21 18:02 ` Serge Petrenko [this message]
2019-02-25  8:40   ` [PATCH v2 2/2] box: set readahead before replicaset sync Vladimir Davydov

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=816fa321bb9001160233eafa3a052959a62788e1.1550771940.git.sergepetrenko@tarantool.org \
    --to=sergepetrenko@tarantool.org \
    --cc=georgy@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --cc=vdavydov.dev@gmail.com \
    --subject='Re: [PATCH v2 2/2] box: set readahead before replicaset sync' \
    /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