[MXS-3449] Maxscale sets MASTER_GTID_WAIT timeout to zero, when causal_reads_timeout is less than 1s Created: 2021-03-17  Updated: 2021-03-18  Resolved: 2021-03-18

Status: Closed
Project: MariaDB MaxScale
Component/s: readwritesplit
Affects Version/s: 2.5.9
Fix Version/s: 2.5.10

Type: Bug Priority: Major
Reporter: Jozef Kováč Assignee: markus makela
Resolution: Fixed Votes: 0
Labels: None
Environment:

Ubuntu 18.04.5 & RHEL 8.3



 Description   

MASTER_GTID_WAIT accept timeout value from 0.000001s and maxscale 2.5 has no problem starting with value lower than 1s compared to 2.4.

Mariadb general_log:
SET @maxscale_secret_variable=(SELECT CASE WHEN MASTER_GTID_WAIT('1-13-474756993', 0) = 0 THEN 1 ELSE (SELECT 1 FROM INFORMATION_SCHEMA.ENGINES) END);SELECT ..

From maxctrl show service Splitter-Service
...
"causal_reads_timeout": 500,
...

conf:

[maxscale]
threads=8
syslog=1
maxlog=0
log_notice=0
load_persisted_configs=false
local_address=10.1.1.23
auth_connect_timeout=20s
users_refresh_time=10s
max_auth_errors_until_block=100
admin_gui=0
 
[master]
type=server
address=10.1.1.121
port=3306
protocol=MariaDBBackend
 
[slave-1]
type=server
address=10.1.1.14
port=3306
protocol=MariaDBBackend
 
[Monitor]
type=monitor
module=mariadbmon
servers=master,slave-1
user=xxx
password=xxx
monitor_interval=3s
assume_unique_hostnames=OFF
master_conditions=none
slave_conditions=linked_master
ignore_external_masters=ON
 
[Splitter-Service]
type=service
router=readwritesplit
servers=master,slave-1
user=xxx
password=xxx
#session_track_trx_state=1
max_slave_replication_lag=5s
max_sescmd_history=500 
slave_connections=1
master_accept_reads=true
use_sql_variables_in=master
master_failure_mode=fail_on_write
causal_reads=local
causal_reads_timeout=500ms
 
[ReadWrite-Listener]
type=listener
service=Splitter-Service
protocol=MariaDBClient
socket=/run/maxscale/maxscale.sock



 Comments   
Comment by markus makela [ 2021-03-17 ]

For 2.5 I think it should refuse values that round down to a zero, just to keep it consistent with 2.4. For 2.6 the code in readwritesplit could be changed to allow milliseconds for the timeout.

Generated at Thu Feb 08 04:21:30 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.