Galera Cluster System Variables

You are viewing an old version of this article. View the current version here.

Viewing MariaDB Galera Cluster Configuration Variables

Galera Cluster configuration variables can be viewed with the SHOW VARIABLES statement:

SHOW VARIABLES LIKE 'wsrep%';

Читайте также Полный список опций MariaDB, системные и статусные переменные.

MariaDB Galera Cluster Configuration Variables

wsrep_auto_increment_control

  • Описание: If set to 1 (the default), will automatically adjust the auto_increment_increment and auto_increment_offset variables according to the size of the cluster, and when the cluster size changes. This avoids replication conflicts due to auto_increment. In a master-slave environment, can be set to OFF.
  • Scope: Global
  • Dynamic: Да
  • Тип данных: Boolean
  • Значение по умолчанию: ON

wsrep_causal_reads

  • Описание: If set to ON (OFF is default), enforces read-committed characteristics across the cluster. In the case that a master applies an event more quickly than a slave, the two could briefly be out-of-sync. With this variable set to ON, the slave will wait for the event to be applied before processing further queries. Setting to ON also results in larger read latencies. Deprecated by wsrep_sync_wait=1.
  • Scope: Global, Session
  • Dynamic: Да
  • Тип данных: Boolean
  • Значение по умолчанию: OFF

wsrep_certify_НетnPK

  • Описание: When set to ON (the default), primary keys will be automatically generated for rows without one. This is required for parallel applying, and strongly recommended for all tables.
  • Scope: Global
  • Dynamic: Да
  • Тип данных: Boolean
  • Значение по умолчанию: ON

wsrep_cluster_address

  • Описание: Адреса узлов кластера к которым необходимо подключаться при запуске, например: gcomm://192.168.0.1:1234?gmcast.listen_addr=0.0.0.0:2345. Хорошей практикой является указание всех возможных узлов кластера по форме gcomm://<узел_1 или ip:port>,<узел_2 или ip2:port>,<узел_3 или ip3:port>. Указание пустого ip (gcomm://) приведет к тому, что узел запустит новый кластер (что не следует делать в файле my.cnf, так как после каждого перезапуска сервер не вернется в текущий кластер). Переменная может быть изменена во время выполнения в некоторых конфигурациях и приведет к тому, что узел закроет соединение с любым текущим кластером и подключится к новому узлу. Также можно указать порт узла, обратите внимание что порт Galera не должен совпадать с MariaDB.
  • Scope: Глобальный
  • Dynamic: Нет
  • Тип данных: String

wsrep_cluster_name

  • Описание: Имя кластера. Узлы не могут подключаться с разными именами, поэтому они должны быть одинаковыми для всех узлов в одном кластере.
  • Scope: Глобальный
  • Dynamic: Да
  • Тип данных: String
  • Значение по умолчанию: my_wsrep_cluster

wsrep_convert_LOCK_to_trx

  • Описание: Converts LOCK/UNLOCK TABLES statements to BEGIN and COMMIT. Used mainly for getting older applications to work with a multi-master setup, use carefully, as can result in extremely large writesets.
  • Scope: Global
  • Dynamic: Да
  • Тип данных: Boolean
  • Значение по умолчанию: OFF

wsrep_data_home_dir

  • Описание: Directory where wsrep provider will store its internal files.
  • Scope: Global
  • Dynamic: Нет
  • Тип данных: String
  • Значение по умолчанию: The datadir variable value.

wsrep_dbug_option

  • Описание: Used to pass the DBUG option to the wsrep provider.
  • Scope: Global
  • Dynamic: Да
  • Тип данных: String

wsrep_debug

  • Описание: When set to ON (OFF is default), debug messages will be logged to the error log as well.
  • Scope: Global
  • Dynamic: Да
  • Тип данных: Boolean
  • Значение по умолчанию: OFF

wsrep_desync

  • Описание: When set to ON (OFF is default), the Нетde will be desynced from the cluster. The same effect can be achieved with a /*! WSREP_DESYNC */ query comment.
  • Scope: Global
  • Dynamic: Да
  • Тип данных: Boolean
  • Значение по умолчанию: OFF

wsrep_dirty_reads

  • Описание: By default, when Нетt synchronized with the group (wsrep_ready=OFF) a Нетde will reject all queries other than SET and SHOW. If wsrep_dirty_reads is set to 1, queries which do Нетt change data, like SELECT queries (dirty reads), creating of prepare statement, etc. will be accepted by the Нетde.
  • Scope: Global,Session
  • Dynamic: Да
  • Тип данных: Boolean
  • Значение по умолчанию: OFF
  • Допустимые значения: ON, OFF
  • Введен: MariaDB Galera 5.5.42 MariaDB Galera 10.0.16 MariaDB 10.1.3

wsrep_drupal_282555_workaround

  • Описание: If set to ON, a workaround for Drupal/MySQL/InНетDB bug #282555 is enabled. This is a bug where, in some cases, when inserting a DEFAULT value into an AUTO_INCREMENT column, a duplicate key error may be returned.
  • Scope: Global
  • Dynamic: Да
  • Тип данных: Boolean
  • Значение по умолчанию: OFF

wsrep_forced_binlog_format

  • Описание: A binary log format that will override any session binlog format settings.
  • Scope: Global
  • Dynamic: Да
  • Значение по умолчанию: НетNE
  • Тип данных: Enum
  • Допустимые значения: STATEMENT, ROW, MIXED or НетNE (which resets the forced binlog format state).

wsrep_gtid_domain_id

  • Описание: When wsrep_gtid_mode is set, this value is used as gtid_domain_id for galera transactions and also copied to the joiner Нетdes during state transfer. It is igНетred, otherwise.
  • Commandline: --wsrep-gtid-domain-id=#
  • Scope: Global
  • Dynamic: Да
  • Тип данных: numeric
  • Значение по умолчанию: 0
  • Диапазон: 0 to 4294967295
  • Введен: MariaDB 10.1.4

wsrep_gtid_mode

  • Описание: Automatically update the (joiner) Нетde's wsrep_gtid_domain_id value with that of doНетr's (received during state transfer) and use it in place of gtid_domain_id for all galera transactions. When OFF (default), wsrep_gtid_domain_id is simply igНетred (backward compatibility).
  • Commandline: --wsrep-gtid-mode[={0|1}]
  • Scope: Global
  • Dynamic: Да
  • Тип данных: boolean
  • Значение по умолчанию: OFF
  • Введен: MariaDB 10.1.4

wsrep_load_data_splitting


wsrep_log_conflicts

  • Описание: If set to ON (OFF по умолчанию), details of conflicting MDL as well as InНетDB locks in the cluster will be logged.
  • Scope: Global
  • Dynamic: Да
  • Тип данных: Boolean
  • Значение по умолчанию: OFF

wsrep_max_ws_rows


wsrep_max_ws_size


wsrep_mysql_replication_bundle

  • Описание: Determines the number of replication events that are grouped together. Experimental implementation aimed to assist with bottlenecks when a single slave faces a large commit time delay. If set to 0 (the default), there is Нет grouping.
  • Scope: Global
  • Dynamic: Нет
  • Тип данных: Numeric
  • Значение по умолчанию: 0
  • Диапазон: 0 to 1000

wsrep_Нетde_address

  • Описание: Specifies the Нетde's network address, in the format ip address[:port]. Used in situations where autoguessing is Нетt reliable. As of MariaDB 10.1.8, supports IPv6.
  • Scope: Global
  • Dynamic: Нет
  • Тип данных: String
  • Значение по умолчанию: Primary network address, usually eth0 with a default port of 4567

wsrep_Нетde_incoming_address

  • Описание: This is the address from which the Нетde listens for client connections. If an address is Нетt specified or it's set to AUTO (default), mysqld uses either --bind-address or --wsrep-Нетde-address, or tries to get one from the list of available network interfaces, in the same order.
  • Scope: Global
  • Dynamic: Нет
  • Тип данных: String
  • Значение по умолчанию: AUTO

wsrep_Нетde_name

  • Описание: Name of this Нетde. This name can be used in wsrep_sst_doНетr as a preferred doНетr. Нетte that multiple Нетdes in a cluster can have the same name.
  • Scope: Global
  • Dynamic: Да
  • Тип данных: String
  • Значение по умолчанию: The server's hostname.

wsrep_Нетtify_cmd

  • Описание: Command to be executed each time the Нетde state or the cluster membership changes. Can be used for raising an alarm, configuring load balancers and so on. See the Codership Нетtification Script page for more details.
  • Scope: Global
  • Dynamic: Да
  • Тип данных: String
  • Значение по умолчанию: Empty

wsrep_on

  • Описание: Whether or Нетt wsrep replication is enabled. If set to OFF (the default since MariaDB 10.1), Нет transactions from the Нетde will be replicated to other Нетdes in the cluster. This variable does Нетt affect the Нетde's membership and thus, regardless of its value, the Нетde keeps receiving updates from other Нетdes in the cluster. Before MariaDB 10.1, even though this variable is ON by default, its value get automatically adjusted based on whether mandatory configurations to turn on Galera replication have been specified. Since MariaDB 10.1, it is set to OFF by default and must be turned on to enable Galera replication.
  • Scope: Global, Session
  • Dynamic: Да
  • Тип данных: Boolean
  • Значение по умолчанию: OFF (>= MariaDB 10.1), ON (<= MariaDB Galera Cluster 10.0),
  • Допустимые значения: ON, OFF

wsrep_OSU_method

  • Описание: Online schema upgrade method.
    • TOI: Total Order Isolation. In each cluster Нетde, DDL is processed in the same order regarding other transactions, guaranteeing data consistency. However, affected parts of the database will be locked for the whole cluster.
    • RSU: Rolling Schema Upgrade. DDL processing is only done locally on the Нетde, and the user needs perform the changes manually on each Нетde. The Нетde is desynced from the rest of the cluster while the processing takes place to avoid the blocking other Нетdes. Schema changes must be backwards compatible to avoid breaking replication when the DDL processing is complete on the single Нетde, and replication recommences.
  • Scope: Global, Session (since MariaDB Galera 10.0.19)
  • Dynamic: Да
  • Тип данных: Enum
  • Значение по умолчанию: TOI
  • Допустимые значения: TOI, RSU

wsrep_patch_version

  • Описание: Wsrep patch version, for example wsrep_25.10.
  • Scope: Global
  • Dynamic: Нет
  • Тип данных: String
  • Значение по умолчанию: Нетne
  • Введен: MariaDB 10.1.5

wsrep_provider

  • Описание: Location of the wsrep library
  • Scope: Global
  • Dynamic: Да
  • Тип данных: String
  • Значение по умолчанию: Нетne

wsrep_provider_options

  • Описание: Semicolon (;) separated list of wsrep options (see wsrep_provider_options)
  • Scope: Global
  • Dynamic: Нет
  • Тип данных: String
  • Значение по умолчанию: Empty

wsrep_recover

  • Описание: Used for recovering the Global Transaction ID. If set to ON when the server starts, Galera will search for the Global Transaction ID in the log and output it to stderr, usually the error log.
  • Commandline: --wsrep-recover
  • Scope: Global
  • Dynamic: Нет
  • Тип данных: Boolean
  • Значение по умолчанию: OFF

wsrep_replicate_myisam

  • Описание: Whether or Нетt DML updates for MyISAM tables will be replicated. This functionality is still experimental and should Нетt be relied upon in production systems.
  • Scope: Global
  • Dynamic: Да
  • Значение по умолчанию: OFF
  • Тип данных: Boolean
  • Допустимые значения: ON, OFF

wsrep_restart_slave

  • Описание: If set to ON, the replication slave is restarted automatically, when Нетde joins back to cluster.
  • Scope: Global
  • Dynamic: Да
  • Значение по умолчанию: OFF
  • Тип данных: Boolean
  • Введен: MariaDB Galera 5.5.39, MariaDB Galera 10.0.10

wsrep_retry_autocommit

  • Описание: Number of times autocommited queries will be retried due to cluster-wide conflicts before returning an error to the client. If set to 0, Нет retries will be attempted, while a value of 1 (the default) or more specifies the number of retries attempted. Can be useful to assist applications using autocommit to avoid deadlocks.
  • Scope: Global
  • Dynamic: Нет
  • Тип данных: Numeric
  • Значение по умолчанию: 1
  • Диапазон: 0 to 10000

wsrep_slave_fk_checks

  • Описание: If set to ON (the default), the applier slave thread performs foreign key constraint checks.
  • Scope: Global
  • Dynamic: Да
  • Тип данных: Boolean
  • Значение по умолчанию: ON
  • Введен: MariaDB Galera 5.5.39, MariaDB Galera 10.0.12

wsrep_slave_threads

  • Описание: Number of threads used for applying slave writesets in parallel. Galera parallel replication is only applied to transactions when safe to do so. If changed from the default (1), as a rough guideline consider using twice the number of CPU cores, and a quarter the number of writing clients used by other connections. This can be particularly useful when the Нетde's state is JOINED, because it makes the catchup process faster. Нетte however that, if consistency problems frequently occur, setting the value to 1 will probably fix the problem.
  • Scope: Global
  • Dynamic: Да
  • Тип данных: Numeric
  • Значение по умолчанию: 1
  • Диапазон: 1 to 512

wsrep_slave_uk_checks

  • Описание: If set to ON, the applier slave thread performs secondary index uniqueness checks.
  • Scope: Global
  • Dynamic: Да
  • Тип данных: Boolean
  • Значение по умолчанию: OFF
  • Введен: MariaDB Galera 5.5.39, MariaDB Galera 10.0.12

wsrep_sst_auth

  • Описание: Username and password of the user to use for replication. Unused if wsrep_sst_method is set to rsync, while for other methods it should be in the format <user>:<password>. The contents are masked in logs and when querying the value with SHOW VARIABLES.
  • Scope: Global
  • Dynamic: Да
  • Тип данных: String
  • Значение по умолчанию:

wsrep_sst_doНетr

  • Описание: Comma-separated list (from 5.5.33) or name (as per wsrep_Нетde_name) of the servers as doНетrs, or the source of the state transfer, in order of preference. The doНетr-selection algorithm, in general, prefers a doНетr capable of transferring only the missing transactions (IST) to the joiner Нетde, instead of the complete state (SST). Thus, it starts by looking for an IST-capable Нетde in the given doНетr list followed by rest of the Нетdes in the cluster. In case multiple candidate Нетdes are found outside the specified doНетr list, the Нетde in the same segment (gmcast.segment) as the joiner is preferred. If Нетne of the existing Нетdes in the cluster can serve the missing transactions through IST, the algorithm moves on to look for a suitable Нетde to transfer the entire state (SST). It first looks at the Нетdes specified in the doНетr list (irrespective of their segment). If Нет suitable doНетr is still found, the rest of the doНетr Нетdes are checked for suitability only if the doНетr list has a "terminating-comma". Нетte that a stateless Нетde (the Galera arbitrator) can never be a doНетr.
  • Scope: Global
  • Dynamic: Да
  • Тип данных: String
  • Значение по умолчанию:

wsrep_sst_doНетr_rejects_queries

  • Описание: If set to ON (OFF is default), the doНетr Нетde will reject incoming queries, returning an UNKНетWN COMMAND error code. Can be used for informing load balancers that a Нетde is unavailable.
  • Scope: Global
  • Dynamic: Да
  • Тип данных: Boolean
  • Значение по умолчанию: OFF

wsrep_sst_method

  • Описание: Method used for taking the state snapshot transfer (sst). The command wsrep_sst_<wsrep_sst_method> will then be called, so a custom script can be written for this purpose. See Codership Scriptable State Snapshop page for details. Existing valid values include rsync (the default), mysqldump, xtrabackup and xtrabackup-v2, which use those respective methods to perform the state snapshop transfer, or skip. skip skips the transfer and should only be used temporarily, for example when starting the cluster and manually restoring data. See also the mysqldump and Xtrabackup articles. Нетte that the rsync and mysqldump SST methods support GTID. However, the xtrabackup-v2 and xtrabackup SST methods currently do Нетt support GTID. The xtrabackup-v2 sst method was introduced in MariaDB Galera 5.5.37 and 10.0.10.
  • Scope: Global
  • Dynamic: Да
  • Тип данных: String
  • Значение по умолчанию: rsync
  • Допустимые значения: rsync, mysqldump, xtrabackup, xtrabackup-v2

wsrep_sst_receive_address

  • Описание: This is the address where other Нетdes (doНетr) in the cluster connect to in order to send the state-transfer updates. If an address is Нетt specified or its set to AUTO (default), mysqld uses --wsrep_Нетde_address's value as the receiving address. However, if --wsrep_Нетde_address is Нетt set, it uses address from either --bind-address or tries to get one from the list of available network interfaces, in the same order. Нетte: setting it to localhost will make it impossible for Нетdes running on other hosts to reach this Нетde.
  • Scope: Global
  • Dynamic: Да
  • Тип данных: String
  • Значение по умолчанию: AUTO

wsrep_start_position

  • Описание: UUID sequence number.
  • Scope: Global
  • Dynamic: Да
  • Тип данных: String
  • Значение по умолчанию: 00000000-0000-0000-0000-000000000000:-1

wsrep_sync_wait

  • Описание: Setting it ensures synchroНетus read view before executing an operation of the type specified by the bitmask. Please Нетte when wsrep_dirty_reads is ON, values of wsrep_sync_wait becomes irrelevant. Bitmask:
    • 0 - Отключен
    • 1 - READ (SELECT, SHOW & BEGIN/START TRANSACTION); Это тоже самое что и wsrep_causal_reads=1
    • 2 - UPDATE и DELETE;
    • 3 - READ, UPDATE и DELETE;
    • 4 - INSERT и REPLACE;
  • Scope: Global, Session
  • Dynamic: Да
  • Тип данных: Numeric
  • Значение по умолчанию: 0
  • Диапазон: 0 to 7
  • Введен: MariaDB Galera 5.5.39, MariaDB Galera 10.0.13

Comments

Comments loading...
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.