Skip to content

Commit 1638eaa

Browse files
committed
Setup replication_sync_timeout at .tarantoolctl
Found that tests may fail due to hang in seek_wait() loop on starting and stopping instances. It happened, because instances were not synced within default output timeout which is by default 120 seconds, while replication sync happens only each 300 seconds by default. To fix it replication_sync_timeout should be decreased to some value lower than 'no-output-timeout', so decided to set it to 100 seconds.
1 parent e359d7e commit 1638eaa

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

.tarantoolctl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ default_cfg = {
88
vinyl_dir = workdir,
99
log = workdir,
1010
background = false,
11+
replication_sync_timeout = 100,
1112
}
1213

1314
instance_dir = workdir

lib/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ def module_init():
5252
soext = sys.platform == 'darwin' and 'dylib' or 'so'
5353
os.environ["LUA_PATH"] = SOURCEDIR+"/?.lua;"+SOURCEDIR+"/?/init.lua;;"
5454
os.environ["LUA_CPATH"] = BUILDDIR+"/?."+soext+";;"
55+
os.environ["REPLICATION_SYNC_TIMEOUT"] = str(args.replication_sync_timeout)
5556

5657
TarantoolServer.find_exe(args.builddir)
5758
UnittestServer.find_exe(args.builddir)

lib/options.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,20 @@ def __init__(self):
193193
--valgrind, --long options is passed).
194194
Note: The option works now only with parallel testing.""")
195195

196+
parser.add_argument(
197+
"--replication-sync-timeout",
198+
dest="replication_sync_timeout",
199+
default=100,
200+
type=int,
201+
help="""The number of seconds that a replica will wait when
202+
trying to sync with a master in a cluster, or a quorum of
203+
masters, after connecting or during configuration update.
204+
This could fail indefinitely if replication_sync_lag is smaller
205+
than network latency, or if the replica cannot keep pace with
206+
master updates. If replication_sync_timeout expires, the replica
207+
enters orphan status.
208+
Default: 100 [seconds].""")
209+
196210
parser.add_argument(
197211
"--luacov",
198212
dest="luacov",

0 commit comments

Comments
 (0)