Galera Cluster System Variables
You are viewing an old version of this article. View
the current version here.
Contents
- Viewing MariaDB Galera Cluster Configuration Variables
- MariaDB Galera Cluster Configuration Variables
- wsrep_auto_increment_control
- wsrep_causal_reads
- wsrep_certify_nonPK
- wsrep_cluster_address
- wsrep_cluster_name
- wsrep_convert_LOCK_to_trx
- wsrep_data_home_dir
- wsrep_dbug_option
- wsrep_debug
- wsrep_desync
- wsrep_dirty_reads
- wsrep_drupal_282555_workaround
- wsrep_forced_binlog_format
- wsrep_gtid_domain_id
- wsrep_gtid_mode
- wsrep_load_data_splitting
- wsrep_log_conflicts
- wsrep_max_ws_rows
- wsrep_max_ws_size
- wsrep_mysql_replication_bundle
- wsrep_node_address
- wsrep_node_incoming_address
- wsrep_node_name
- wsrep_notify_cmd
- wsrep_on
- wsrep_OSU_method
- wsrep_patch_version
- wsrep_provider
- wsrep_provider_options
- wsrep_recover
- wsrep_replicate_myisam
- wsrep_restart_slave
- wsrep_retry_autocommit
- wsrep_slave_fk_checks
- wsrep_slave_threads
- wsrep_slave_uk_checks
- wsrep_sst_auth
- wsrep_sst_donor
- wsrep_sst_donor_rejects_queries
- wsrep_sst_method
- wsrep_sst_receive_address
- wsrep_start_position
- wsrep_sync_wait
Viewing MariaDB Galera Cluster Configuration Variables
Galera Cluster configuration variables можно посмотреть с помощью SHOW VARIABLES:
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 toOFF
. - Scope: Глобальный
- 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 toON
, the slave will wait for the event to be applied before processing further queries. Setting toON
also results in larger read latencies. Deprecated by wsrep_sync_wait=1. - Scope: Global, Session
- Dynamic: Да
- Тип данных: Boolean
- Значение по умолчанию:
OFF
wsrep_certify_nonPK
- Описание: When set to
ON
(по умолчанию), primary keys will be automatically generated for rows without one. This is required for parallel applying, and strongly recommended for all tables. - Scope: Глобальный
- 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: Глобальный
- Dynamic: Да
- Тип данных: Boolean
- Значение по умолчанию:
OFF
wsrep_data_home_dir
- Описание: Каталог где wsper провайдер будет хранить свои файлы.
- Scope: Глобальный
- Dynamic: Нет
- Тип данных: String
- Значение по умолчанию: The datadir variable value.
wsrep_dbug_option
- Описание: Используется для передачи DBUG опции wsrep провайдеру.
- Scope: Глобальный
- Dynamic: Да
- Тип данных: String
wsrep_debug
- Описание: Когда установлен в
ON
(OFF
по умолчанию), сообщения отладки будут записываться в журнал лога error log. - Scope: Глобальный
- Dynamic: Да
- Тип данных: Boolean
- Значение по умолчанию:
OFF
wsrep_desync
- Описание: Когда установлен в
ON
(OFF
по умолчанию), the node will be desynced from the cluster. The same effect can be achieved with a/*! WSREP_DESYNC */
query comment. - Scope: Глобальный
- Dynamic: Да
- Тип данных: Boolean
- Значение по умолчанию:
OFF
wsrep_dirty_reads
- Описание: By default, when not synchronized with the group (wsrep_ready=OFF) a Нетde will reject all queries other than SET and SHOW. If
wsrep_dirty_reads
is set to1
, queries which do Нетt change data, like SELECT queries (dirty reads), creating of prepare statement, etc. will be accepted by the Нетde. - Scope: Глобальный, Сессия
- 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 aDEFAULT
value into an AUTO_INCREMENT column, a duplicate key error may be returned. - Scope: Глобальный
- Dynamic: Да
- Тип данных: Boolean
- Значение по умолчанию:
OFF
wsrep_forced_binlog_format
- Описание: A binary log format that will override any session binlog format settings.
- Scope: Глобальный
- 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: Глобальный
- Dynamic: Да
- Тип данных:
numeric
- Значение по умолчанию:
0
- Диапазон:
0
to4294967295
- Введен:
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: Глобальный
- Dynamic: Да
- Тип данных:
boolean
- Значение по умолчанию:
OFF
- Введен: MariaDB 10.1.4
wsrep_load_data_splitting
- Описание: If set to
ON
(по умолчанию), LOAD DATA INFILE supports big data files by introducing transaction splitting. - Scope: Глобальный
- Dynamic: Да
- Тип данных: Boolean
- Значение по умолчанию:
ON
- Введен: MariaDB Galera 5.5.32, MariaDB Galera 10.0.7, MariaDB 10.1.3
wsrep_log_conflicts
- Описание: If set to
ON
(OFF
по умолчанию), details of conflicting MDL as well as InnoDB locks in the cluster will be logged. - Scope: Глобальный
- Dynamic: Да
- Тип данных: Boolean
- Значение по умолчанию:
OFF
wsrep_max_ws_rows
- Описание: Maximum permitted number of rows per writeset. Before MariaDB Galera 10.0.27 and MariaDB 10.1.17 this variable was igНетred internally and had Нет effect on the Нетde. From MariaDB Galera 10.0.27 and MariaDB 10.1.17 support for this variable has been added and in order to be backward compatible the default value has been changed to
0
, which essentially allows writesets to be any size. - Scope: Глобальный
- Dynamic: Да
- Тип данных: Numeric
- Значение по умолчанию:
0
(>= MariaDB Galera 10.0.27, MariaDB 10.1.17)131072
(<= MariaDB Galera 10.0.26, MariaDB 10.1.16)
- Диапазон:
0
to1048576
wsrep_max_ws_size
- Описание: Maximum permitted size in bytes per writeset. Writesets exceeding this will be rejected. Нетte that versions from and before MariaDB 10.1.17 and MariaDB Galera 10.0.27 permitted the maximum to be set beyond 2GB, which was rejected by Galera.
- Scope: Глобальный
- Dynamic: Да
- Тип данных: Numeric
- Значение по умолчанию:
2147483647
(2GB, >= MariaDB Galera 10.0.27, MariaDB 10.1.17)1073741824
(1GB, <= MariaDB Galera 10.0.26, MariaDB 10.1.16)
- Диапазон:
1024
to2147483647
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: Глобальный
- Dynamic: Нет
- Тип данных: Numeric
- Значение по умолчанию:
0
- Диапазон:
0
to1000
wsrep_node_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: Глобальный
- Dynamic: Нет
- Тип данных: String
- Значение по умолчанию: Primary network address, usually
eth0
with a default port of 4567
wsrep_node_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: Глобальный
- Dynamic: Нет
- Тип данных: String
- Значение по умолчанию:
AUTO
wsrep_node_name
- Описание: Имя узла. Это имя может быть использовано в wsrep_sst_donor в качестве предпочтительного донора. Обратите внимание, что несколько узлов в кластере могут иметь одинаковое имя.
- Scope: Глобальный
- Dynamic: Да
- Тип данных: String
- Значение по умолчанию: Имя сервера (hostname).
wsrep_notify_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: Глобальный
- Dynamic: Да
- Тип данных: String
- Значение по умолчанию: Пустой
wsrep_on
- Описание: Включение или отключение wsrep репликации. Если установлено
OFF
(по умолчанию с MariaDB 10.1), то никакие транзакции с этого узла не будут реплицироваться на другие узлы кластера. Эта переменная не влияет на членство в других узлах, и следовательно, не зависимо от ее значения, узел будет продолжать получать обновления с других узлов кластера. До MariaDB 10.1, эта переменная по умолчанию установлена вON
, но ее значение настраивается автоматически в зависимости от того, указаны ли обязательная конфигурация для включения репликации Galera. Начиная с MariaDB 10.1, по умолчанию установлено вOFF
и должен был включен, чтобы Galera репликация начала работать. - 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: Глобальный, Сессия (с MariaDB Galera 10.0.19)
- Dynamic: Да
- Тип данных: Enum
- Значение по умолчанию:
TOI
- Допустимые значения:
TOI
,RSU
wsrep_patch_version
- Описание: Версия патча Wsrep, пример:
wsrep_25.10
. - Scope: Глобальный
- Dynamic: Нет
- Тип данных: String
- Значение по умолчанию: none
- Введен: MariaDB 10.1.5
wsrep_provider
- Описание: Расположение библиотеки wsrep
- Scope: Глобальный
- Dynamic: Да
- Тип данных: String
- Значение по умолчанию: none
wsrep_provider_options
- Описание: Semicolon (;) separated list of wsrep options (see wsrep_provider_options)
- Scope: Глобальный
- 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: Глобальный
- Dynamic: Нет
- Тип данных: Boolean
- Значение по умолчанию:
OFF
wsrep_replicate_myisam
- Описание: Whether or not DML updates for MyISAM tables will be replicated. This functionality is still experimental and should Нетt be relied upon in production systems.
- Scope: Глобальный
- Dynamic: Да
- Значение по умолчанию:
OFF
- Тип данных: Boolean
- Допустимые значения:
ON
,OFF
wsrep_restart_slave
- Описание: Если установлено в ON, автоматически перезагружает вторичные репликации, когда узел присоединяется к кластеру.
- Scope: Глобальный
- 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 of1
(the default) or more specifies the number of retries attempted. Can be useful to assist applications using autocommit to avoid deadlocks. - Scope: Глобальный
- Dynamic: Нет
- Тип данных: Numeric
- Значение по умолчанию:
1
- Диапазон:
0
to10000
wsrep_slave_fk_checks
- Описание: Если установлено в ON (по умолчанию), the applier slave thread performs foreign key constraint checks.
- Scope: Глобальный
- 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 to1
will probably fix the problem. - Scope: Глобальный
- Dynamic: Да
- Тип данных: Numeric
- Значение по умолчанию:
1
- Диапазон:
1
to512
wsrep_slave_uk_checks
- Описание: If set to ON, the applier slave thread performs secondary index uniqueness checks.
- Scope: Глобальный
- Dynamic: Да
- Тип данных: Boolean
- Значение по умолчанию: OFF
- Введен: MariaDB Galera 5.5.39, MariaDB Galera 10.0.12
wsrep_sst_auth
- Описание: Логин и пароль пользователя используемый при репликации. Не используется если wsrep_sst_method установлено значение
rsync
, однако для остальных случаев параметр должен иметь формат<user>:<password>
. Содержимое параметра маскируется в логах и при запросе параметра через SHOW VARIABLES. - Scope: Глобальный
- Dynamic: Да
- Тип данных: String
- Значение по умолчанию:
wsrep_sst_donor
- Описание: Comma-separated list (from 5.5.33) or name (as per wsrep_node_name) of the servers as donors, or the source of the state transfer, in order of preference. The donor-selection algorithm, in general, prefers a donor capable of transferring only the missing transactions (IST) to the joiner node, instead of the complete state (SST). Thus, it starts by looking for an IST-capable node in the given donor list followed by rest of the nodes in the cluster. In case multiple candidate nodes are found outside the specified doНетr list, the node in the same segment (gmcast.segment) as the joiner is preferred. If none of the existing nodes in the cluster can serve the missing transactions through IST, the algorithm moves on to look for a suitable node to transfer the entire state (SST). It first looks at the nodes specified in the donor list (irrespective of their segment). If no suitable donor is still found, the rest of the doНетr Нетdes are checked for suitability only if the donor list has a "terminating-comma". note that a stateless node (the Galera arbitrator) can never be a donor.
- Scope: Глобальный
- Dynamic: Да
- Тип данных: String
- Значение по умолчанию:
wsrep_sst_donor_rejects_queries
- Описание: If set to
ON
(OFF
по умолчанию), the donor node will reject incoming queries, returning anUNKNOWN COMMAND
error code. Can be used for informing load balancers that a node is unavailable. - Scope: Глобальный
- 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 includersync
(the default),mysqldump
,xtrabackup
andxtrabackup-v2
, which use those respective methods to perform the state snapshop transfer, orskip
.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 thersync
andmysqldump
SST methods support GTID. However, thextrabackup-v2
andxtrabackup
SST methods currently do Нетt support GTID. Thextrabackup-v2
sst method was introduced in MariaDB Galera 5.5.37 and 10.0.10. - Scope: Глобальный
- Dynamic: Да
- Тип данных: String
- Значение по умолчанию:
rsync
- Допустимые значения:
rsync
,mysqldump
,xtrabackup
,xtrabackup-v2
wsrep_sst_receive_address
- Описание: This is the address where other nodes (donor) 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 tolocalhost
will make it impossible for Нетdes running on other hosts to reach this Нетde. - Scope: Глобальный
- Dynamic: Да
- Тип данных: String
- Значение по умолчанию:
AUTO
wsrep_start_position
- Описание: UUID последовательность чисел.
- Scope: Глобальный
- Dynamic: Да
- Тип данных: String
- Значение по умолчанию:
00000000-0000-0000-0000-000000000000:-1
wsrep_sync_wait
- Описание: Setting it ensures synchronous 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=12
- UPDATE и DELETE;3
- READ, UPDATE и DELETE;4
- INSERT и REPLACE;
- Scope: Глобальный, Сессия
- Dynamic: Да
- Тип данных: Numeric
- Значение по умолчанию:
0
- Диапазон:
0
to7
- Введен: 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.