Uploaded image for project: 'MariaDB MaxScale'
  1. MariaDB MaxScale
  2. MXS-3899

master_failure_mode = fail_on_write doesn't work

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Incomplete
    • 2.5.15
    • N/A
    • readwritesplit
    • None
    • maxscale 2.5.15
      mysql 5.7.26

    Description

      I have configured readwrite in maxscale, and set the master_failure_mode to fail_on_write (error_on_write), but when I close the master of mysql, all connecion had been closed and any new session connect to maxscale listener port is failure, and logs in /var/log/maxscale/maxscale.log

      stop master:

      name: [234.008_5506_test] status: [Slave, Running] state: [NOT_IN_USE] last opened at: [not opened] last closed at: [not closed] last close reason: [] num sescmd: [0]
      name: [234.008_5507_test] status: [Down] state: [NOT_IN_USE] last opened at: [not opened] last closed at: [not closed] last close reason: [] num sescmd: [0]
      name: [234.008_5508_test] status: [Slave, Running] state: [NOT_IN_USE] last opened at: [not opened] last closed at: [not closed] last close reason: [] num sescmd: [0]
      2021-12-05 22:28:00   error  : (99491) [mariadbclient] Routing the query failed. Session will be closed.
      2021-12-05 22:28:01   error  : (99492) [readwritesplit] (orche_service) Could not find valid server for target type TARGET_SLAVE (COM_QUERY: show databases), closing connection.
      

      orche_service.cnf

      [orche_service]
      type=service
      router=readwritesplit
      router_options=master,slave
      user=maxscale
      password=xxx
      enable_root_user=false
      max_connections=0
      connection_timeout=0
      net_write_timeout=0
      auth_all_servers=false
      strip_db_esc=true
      log_auth_warnings=true
      session_track_trx_state=false
      retain_last_statements=-1
      session_trace=false
      rank=primary
      connection_keepalive=300s
      causal_reads=false
      causal_reads_timeout=10000ms
      delayed_retry=false
      delayed_retry_timeout=10000ms
      disable_sescmd_history=false
      lazy_connect=false
      master_accept_reads=false
      master_failure_mode=fail_on_write
      master_reconnection=true
      max_sescmd_history=50
      max_slave_connections=255
      max_slave_replication_lag=6s
      optimistic_trx=false
      prune_sescmd_history=false
      retry_failed_reads=true
      slave_connections=255
      slave_selection_criteria=LEAST_CURRENT_OPERATIONS
      strict_multi_stmt=false
      strict_sp_calls=false
      transaction_replay=false
      transaction_replay_attempts=5
      transaction_replay_max_size=1073741824
      transaction_replay_retry_on_deadlock=false
      use_sql_variables_in=master
      targets=234.008_5506_test,234.008_5507_test,234.008_5508_test
      

      234.008_5508_test.cnf

      [234.008_5508_test]
      address=192.168.234.8
      extra_port=0
      persistmaxtime=0ms
      persistpoolmax=0
      port=5508
      priority=0
      proxy_protocol=false
      rank=primary
      ssl=false
      ssl_cert_verify_depth=9
      ssl_verify_peer_certificate=false
      ssl_verify_peer_host=false
      ssl_version=MAX
      type=server
      

      I used detect in 2.4 but they seems to be deprecated*

      2021-12-05 22:26:35 warning: [mariadbmon] 'detect_stale_slave' is deprecated and should not be used. Use 'slave_conditions' instead.
      2021-12-05 22:26:35 warning: [mariadbmon] 'detect_standalone_master' is deprecated and should not be used. Use 'master_conditions' instead.
      2021-12-05 22:26:35 warning: [mariadbmon] 'detect_stale_master' is deprecated and should not be used. Use 'master_conditions' instead.
      2021-12-05 22:26:35 warning: [mariadbmon] 'detect_stale_slave' is deprecated and should not be used. Use 'slave_conditions' instead.

      Is this feature(when master is failure, the slaves are continue working) just take effect in Mariadb?
      Are there any other paramters can be seted to support mysql?

      Attachments

        Activity

          People

            Unassigned Unassigned
            Jenvid ZhenweiYang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.