From 4341c2b6e27ff3628ec32b60eef1f063f45a5496 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Tue, 6 Nov 2018 12:32:20 +0200 Subject: [PATCH] MXS-2142: Set causal_reads_timeout default to 10 The causal_reads_timeout default value is too long when considering the behavioral changes that MXS-2141 introduced. With a 10 second default value, a result is returned to the client in a reasonable amount of time. --- Documentation/Routers/ReadWriteSplit.md | 4 ++-- server/modules/routing/readwritesplit/readwritesplit.cc | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Documentation/Routers/ReadWriteSplit.md b/Documentation/Routers/ReadWriteSplit.md index 760f7e6a2..179746b01 100644 --- a/Documentation/Routers/ReadWriteSplit.md +++ b/Documentation/Routers/ReadWriteSplit.md @@ -468,7 +468,7 @@ statements. INSERT INTO test.t1 (id) VALUES (1); SET @maxscale_secret_variable=( SELECT CASE - WHEN MASTER_GTID_WAIT('0-3000-8', 120) = 0 THEN 1 + WHEN MASTER_GTID_WAIT('0-3000-8', 10) = 0 THEN 1 ELSE (SELECT 1 FROM INFORMATION_SCHEMA.ENGINES) END); SELECT * FROM test.t1 WHERE id = 1; @@ -486,7 +486,7 @@ when the slave timed out. ### `causal_reads_timeout` The timeout for the slave synchronization done by `causal_reads`. The -default value is 120 seconds. +default value is 10 seconds. ## Routing hints diff --git a/server/modules/routing/readwritesplit/readwritesplit.cc b/server/modules/routing/readwritesplit/readwritesplit.cc index 33341770e..41db783ab 100644 --- a/server/modules/routing/readwritesplit/readwritesplit.cc +++ b/server/modules/routing/readwritesplit/readwritesplit.cc @@ -492,7 +492,7 @@ extern "C" MXS_MODULE* MXS_CREATE_MODULE() {"master_accept_reads", MXS_MODULE_PARAM_BOOL, "false" }, {"connection_keepalive", MXS_MODULE_PARAM_COUNT, "0" }, {"causal_reads", MXS_MODULE_PARAM_BOOL, "false" }, - {"causal_reads_timeout", MXS_MODULE_PARAM_STRING, "120" }, + {"causal_reads_timeout", MXS_MODULE_PARAM_STRING, "10" }, {"master_reconnection", MXS_MODULE_PARAM_BOOL, "false" }, {"delayed_retry", MXS_MODULE_PARAM_BOOL, "false" }, {"delayed_retry_timeout", MXS_MODULE_PARAM_COUNT, "10" },