В этом учебном пособии мы изучим основы репликации в Manticore Search.
Кратко о репликации
Демон поиска Manticore может реплицировать запись транзакции в индекс Real-Time или Percolate на другие узлы в кластере.
Вы можете попробовать это вживую здесь или прочитать ниже.
Чтобы использовать репликацию с демоном, вам нужно убедиться в следующем:
- ваша сборка поддерживает репликацию (включена по умолчанию в официальных сборках Manticore - https://manticoresearch.com/downloads/ )
- установите параметр data_dir в секции searchd конфигурации. Здесь хранятся входящие индексы
- установите параметр listen с диапазоном как минимум из двух портов на кластер для протокола репликации
- установите параметр listen для протокола SphinxAPI
- установите параметр listen для протокола SphinxQL (для выполнения операторов манипуляции кластером)
- при желании установите параметр server_id. Значения должны быть уникальными в кластере. Если он не установлен, server_ids будут сгенерированы автоматически
Вы можете взглянуть на пример конфигурации Manticore, используемой для этой демонстрации:
cat /etc/sphinxsearch/sphinx1.conf
index pq {
type = percolate
path = /var/lib/manticore/data/pq1
}
index testrt
{
type = rt
path = /var/lib/manticore/data/testrt1
rt_field = title
rt_field = content
rt_attr_uint = gid
}
searchd {
listen = 127.0.0.1:9312
listen = 127.0.0.1:9306:mysql41
listen = 127.0.0.1:9350-9359:replication
data_dir = /var/run/manticore/replication/1
log = /var/run/manticore/log/searchd1.log
pid_file = /var/run/manticore/searchd1.pid
binlog_path = /var/run/manticore/data/pq1
server_id = 1
}
У нас здесь запущены два экземпляра демона поиска Manticore на разных портах (9306 и 9307), чтобы представить два узла в нашем будущем кластере. Конфигурация другого узла:
cat /etc/sphinxsearch/sphinx2.conf
searchd {
listen = 127.0.0.1:9313
listen = 127.0.0.1:9307:mysql41
listen = 127.0.0.1:9360-9369:replication
data_dir = /var/run/manticore/replication/2
log = /var/run/manticore/log/searchd2.log
pid_file = /var/run/manticore/searchd2.pid
binlog_path = /var/run/manticore/data/pq2
server_id = 2
}
Давайте подключимся к первому:
mysql -P 9306 -h0
root@replication-5b59c59f5c-mkqfc:/# mysql -P 9306 -h0
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 3.1.0 445e806e@190716 release
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
и создадим новый кластер в нем.
Создание нового кластера
CREATE CLUSTER posts;
MySQL [(none)]> CREATE CLUSTER posts;
Query OK, 0 rows affected (0.90 sec)
Чтобы убедиться, что кластер был успешно создан, используйте команду SHOW STATUS:
SHOW STATUS LIKE 'cluster%';
MySQL [(none)]> SHOW STATUS LIKE 'cluster%';
+------------------------------------------+----------------------------------------------+
| Counter | Value |
+------------------------------------------+----------------------------------------------+
| cluster_name | posts |
| cluster_posts_state_uuid | 95c2ffc3-c296-11e9-b475-9fad1c2e6dab |
| cluster_posts_conf_id | 1 |
| cluster_posts_status | primary |
| cluster_posts_size | 1 |
| cluster_posts_local_index | 0 |
| cluster_posts_node_state | synced |
| cluster_posts_nodes_set | |
| cluster_posts_nodes_view | 127.0.0.1:9312,127.0.0.1:9350:replication |
| cluster_posts_indexes_count | 0 |
| cluster_posts_indexes | |
| cluster_posts_local_state_uuid | 95c2ffc3-c296-11e9-b475-9fad1c2e6dab |
| cluster_posts_protocol_version | 9 |
| cluster_posts_last_applied | 0 |
| cluster_posts_last_committed | 0 |
| cluster_posts_replicated | 0 |
| cluster_posts_replicated_bytes | 0 |
| cluster_posts_repl_keys | 0 |
| cluster_posts_repl_keys_bytes | 0 |
| cluster_posts_repl_data_bytes | 0 |
| cluster_posts_repl_other_bytes | 0 |
| cluster_posts_received | 2 |
| cluster_posts_received_bytes | 175 |
| cluster_posts_local_commits | 0 |
| cluster_posts_local_cert_failures | 0 |
| cluster_posts_local_replays | 0 |
| cluster_posts_local_send_queue | 0 |
| cluster_posts_local_send_queue_max | 2 |
| cluster_posts_local_send_queue_min | 0 |
| cluster_posts_local_send_queue_avg | 0.500000 |
| cluster_posts_local_recv_queue | 0 |
| cluster_posts_local_recv_queue_max | 2 |
| cluster_posts_local_recv_queue_min | 0 |
| cluster_posts_local_recv_queue_avg | 0.500000 |
| cluster_posts_local_cached_downto | 0 |
| cluster_posts_flow_control_paused_ns | 0 |
| cluster_posts_flow_control_paused | 0.000000 |
| cluster_posts_flow_control_sent | 0 |
| cluster_posts_flow_control_recv | 0 |
| cluster_posts_flow_control_interval | [ 100, 100 ] |
| cluster_posts_flow_control_interval_low | 100 |
| cluster_posts_flow_control_interval_high | 100 |
| cluster_posts_flow_control_status | OFF |
| cluster_posts_cert_deps_distance | 0.000000 |
| cluster_posts_apply_oooe | 0.000000 |
| cluster_posts_apply_oool | 0.000000 |
| cluster_posts_apply_window | 0.000000 |
| cluster_posts_commit_oooe | 0.000000 |
| cluster_posts_commit_oool | 0.000000 |
| cluster_posts_commit_window | 0.000000 |
| cluster_posts_local_state | 4 |
| cluster_posts_local_state_comment | Synced |
| cluster_posts_cert_index_size | 0 |
| cluster_posts_cert_bucket_count | 2 |
| cluster_posts_gcache_pool_size | 1320 |
| cluster_posts_causal_reads | 0 |
| cluster_posts_cert_interval | 0.000000 |
| cluster_posts_open_transactions | 0 |
| cluster_posts_open_connections | 0 |
| cluster_posts_ist_receive_status | |
| cluster_posts_ist_receive_seqno_start | 0 |
| cluster_posts_ist_receive_seqno_current | 0 |
| cluster_posts_ist_receive_seqno_end | 0 |
| cluster_posts_incoming_addresses | 127.0.0.1:9312,127.0.0.1:9350:replication |
| cluster_posts_cluster_weight | 1 |
| cluster_posts_desync_count | 0 |
| cluster_posts_evs_delayed | |
| cluster_posts_evs_evict_list | |
| cluster_posts_evs_repl_latency | 1.075e-06/7.957e-06/2.2911e-05/8.12112e-06/5 |
| cluster_posts_evs_state | OPERATIONAL |
| cluster_posts_gcomm_uuid | 95b52441-c296-11e9-abae-52c260760909 |
+------------------------------------------+----------------------------------------------+
71 rows in set (0.00 sec)
Вы можете увидеть информацию о нашем новом кластере, появившуюся в полях статуса.
Давайте вставим некоторые данные в наш testrt индекс.
INSERT INTO testrt VALUES(1,'Список бизнес-ноутбуков HP','Elitebook Probook',10);
MySQL [(none)]> INSERT INTO testrt VALUES(1,'List of HP business laptops
','Elitebook Probook',10);
Query OK, 1 row affected (0.10 sec)
SELECT * FROM testrt;
MySQL [(none)]> SELECT * FROM testrt;
+------+------+
| id | gid |
+------+------+
| 1 | 10 |
+------+------+
1 row in set (0.10 sec)
Обратите внимание, что все операторы записи, такие как INSERT, REPLACE, DELETE, TRUNCATE, которые должны изменить индекс в кластере, должны использовать формат cluster_name:index_name вместо простого index_name, чтобы изменения были распространены на все реплики в кластере. В противном случае будет вызвана ошибка (см. ниже). Но пока индекс находится в кластере, вы можете вставлять в него без какого-либо префикса:
INSERT INTO testrt VALUES(2,'Список бизнес-ноутбуков Dell','Latitude Precision Vostro',10);
MySQL [(none)]> INSERT INTO testrt VALUES(2,'List of Dell business laptops','Latitude Precision Vostro',10);
Query OK, 1 row affected (0.00 sec)
Когда вы пытаетесь вставить документ в индекс внутри кластера, вам нужно предварить имя кластера именем индекса:
INSERT INTO posts:testrt VALUES(3,'Список бизнес-ноутбуков Dell','Latitude Precision Vostro',10);
MySQL [(none)]> INSERT INTO posts:testrt VALUES(3,'List of Dell business laptops','Latitude Precision Vostro',10);
ERROR 1064 (42000): index 'testrt' is not in any cluster, use just 'testrt'
Поскольку индекс еще не в кластере, мы видим ошибку. Чтобы иметь возможность реплицировать новый документ, мы сначала должны добавить индекс в кластер. Это можно сделать с помощью следующего оператора:
ALTER CLUSTER posts ADD testrt;
MySQL [(none)]> ALTER CLUSTER posts ADD testrt;
Query OK, 0 rows affected (0.10 sec)
Наш testrt индекс теперь в кластере, что можно проверить, посмотрев на поле статуса cluster_posts_indexes (posts - это имя нашего кластера).
SHOW STATUS LIKE 'cluster_posts_indexes';
MySQL [(none)]> SHOW STATUS LIKE 'cluster_posts_indexes';
+-----------------------+--------+
| Counter | Value |
+-----------------------+--------+
| cluster_posts_indexes | testrt |
+-----------------------+--------+
1 row in set (0.00 sec)
Давайте вставим больше данных в наш testrt индекс:
INSERT INTO testrt VALUES(3,'Список бизнес-ноутбуков Dell','Latitude Precision Vostro',10);
MySQL [(none)]> INSERT INTO testrt VALUES(3,'List of Dell business lapto ps','Latitude Precision Vostro',10);
ERROR 1064 (42000): index 'testrt' is a part of cluster 'posts', use 'posts:testrt'
Теперь мы видим ошибку, потому что правильный запрос:
INSERT INTO posts:testrt VALUES(3,'Список бизнес-ноутбуков Dell','Latitude Precision Vostro',10);
MySQL [(none)]> INSERT INTO posts:testrt VALUES(3,'List of Dell business laptops','Latitude Precision Vostro',10);
ERROR 1064 (42000): index 'testrt' is not in any cluster, use just 'testrt'
И он работает, как и ожидалось.
SELECT * FROM testrt;
MySQL [(none)]> SELECT * FROM testrt;
+------+------+
| id | gid |
+------+------+
| 1 | 10 |
+------+------+
1 row in set (0.10 sec)
Присоединение узла к кластеру
Давайте перейдем к другому узлу, который у нас есть.
exit;
MySQL [(none)]> exit;
Bye
mysql -P 9307 -h0
root@replication-5b59c59f5c-mkqfc:/# mysql -P 9307 -h0
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 3.1.0 445e806e@190716 release
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
Мы знаем, что этот узел еще не в нашем кластере, поэтому он не содержит никаких данных в индексе testrt, который мы добавили ранее на другом узле. Здесь даже нет индекса testrt
SELECT * FROM testrt;
MySQL [(none)]> SELECT * FROM testrt;
+------+------+
| id | gid |
+------+------+
| 1 | 10 |
+------+------+
1 row in set (0.10 sec)
Давайте присоединимся к кластеру. Для этого используйте оператор JOIN CLUSTER. Вам нужно будет указать имя кластера (так как может быть несколько кластеров) и узел, к которому вы хотите подключиться:
JOIN CLUSTER posts at '127.0.0.1:9312';
MySQL [(none)]> JOIN CLUSTER posts at '127.0.0.1:9312';
Query OK, 0 rows affected (1.90 sec)
Теперь давайте попробуем снова:
SELECT * FROM testrt;
MySQL [(none)]> SELECT * FROM testrt;
+------+------+
| id | gid |
+------+------+
| 1 | 10 |
+------+------+
1 row in set (0.10 sec)
Мы видим, что все данные индекса были успешно реплицированы. Давайте вставим еще одно значение в индекс.
INSERT INTO posts:testrt VALUES(4,'Список игровых ноутбуков Dell','Inspirion Alienware',20);
MySQL [(none)]> INSERT INTO posts:testrt VALUES(4,'List of Dell gaming l aptops','Inspirion Alienware',20);
Query OK, 1 row affected (0.20 sec)
SELECT * FROM testrt;
MySQL [(none)]> SELECT * FROM testrt;
+------+------+
| id | gid |
+------+------+
| 1 | 10 |
+------+------+
1 row in set (0.10 sec)
А теперь вернемся к нашему первому узлу:
exit;
MySQL [(none)]> exit;
Bye
mysql -P 9306 -h0
root@replication-5b59c59f5c-mkqfc:/# mysql -P 9306 -h0
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 3.1.0 445e806e@190716 release
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
SELECT * FROM testrt;
MySQL [(none)]> SELECT * FROM testrt;
+------+------+
| id | gid |
+------+------+
| 1 | 10 |
+------+------+
1 row in set (0.10 sec)
Как мы видим, изменения были успешно реплицированы.
Удаление индексов и кластеров
Теперь мы удалим наш индекс из кластера:
ALTER CLUSTER posts DROP testrt;
MySQL [(none)]> ALTER CLUSTER posts DROP testrt;
Query OK, 0 rows affected (0.00 sec)
SHOW STATUS LIKE 'cluster_posts_indexes';
MySQL [(none)]> SHOW STATUS LIKE 'cluster_posts_indexes';
+-----------------------+--------+
| Counter | Value |
+-----------------------+--------+
| cluster_posts_indexes | testrt |
+-----------------------+--------+
1 row in set (0.00 sec)
Это сработало!
SELECT * from testrt;
MySQL [(none)]> SELECT * from testrt;
+------+------+
| id | gid |
+------+------+
| 1 | 10 |
| 2 | 10 |
| 3 | 10 |
| 4 | 20 |
+------+------+
4 rows in set (0.00 sec)
Индекс testrt стал просто локальным нереплицируемым индексом. Давайте убедимся в этом:
INSERT INTO testrt VALUES(5,'Список ноутбуков Lenovo','Yoga IdeaPad',30);
MySQL [(none)]> INSERT INTO testrt VALUES(5,'Lenovo laptops list','Yoga IdeaPad',30);
Query OK, 1 row affected (0.00 sec)
Нет предупреждения о пропущенном 'posts:', так что 'testrt' больше не в кластере.
SELECT * from testrt;
MySQL [(none)]> SELECT * from testrt;
+------+------+
| id | gid |
+------+------+
| 1 | 10 |
| 2 | 10 |
| 3 | 10 |
| 4 | 20 |
+------+------+
4 rows in set (0.00 sec)
Давайте переключимся на наш второй узел:
exit;
MySQL [(none)]> exit;
Bye
mysql -P 9307 -h0
root@replication-5b59c59f5c-mkqfc:/# mysql -P 9307 -h0
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 3.1.0 445e806e@190716 release
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
SELECT * from testrt;
MySQL [(none)]> SELECT * from testrt;
+------+------+
| id | gid |
+------+------+
| 1 | 10 |
| 2 | 10 |
| 3 | 10 |
| 4 | 20 |
+------+------+
4 rows in set (0.00 sec)
Как и ожидалось, изменения, которые мы внесли на первом узле, не были реплицированы на второй узел.
Чтобы полностью удалить кластер, используйте оператор DELETE CLUSTER:
DELETE CLUSTER posts;
MySQL [(none)]> DELETE CLUSTER posts;
Query OK, 0 rows affected (6.20 sec)
SHOW STATUS LIKE 'cluster%';
MySQL [(none)]> SHOW STATUS LIKE 'cluster%';
+------------------------------------------+----------------------------------------------+
| Counter | Value |
+------------------------------------------+----------------------------------------------+
| cluster_name | posts |
| cluster_posts_state_uuid | 95c2ffc3-c296-11e9-b475-9fad1c2e6dab |
| cluster_posts_conf_id | 1 |
| cluster_posts_status | primary |
| cluster_posts_size | 1 |
| cluster_posts_local_index | 0 |
| cluster_posts_node_state | synced |
| cluster_posts_nodes_set | |
| cluster_posts_nodes_view | 127.0.0.1:9312,127.0.0.1:9350:replication |
| cluster_posts_indexes_count | 0 |
| cluster_posts_indexes | |
| cluster_posts_local_state_uuid | 95c2ffc3-c296-11e9-b475-9fad1c2e6dab |
| cluster_posts_protocol_version | 9 |
| cluster_posts_last_applied | 0 |
| cluster_posts_last_committed | 0 |
| cluster_posts_replicated | 0 |
| cluster_posts_replicated_bytes | 0 |
| cluster_posts_repl_keys | 0 |
| cluster_posts_repl_keys_bytes | 0 |
| cluster_posts_repl_data_bytes | 0 |
| cluster_posts_repl_other_bytes | 0 |
| cluster_posts_received | 2 |
| cluster_posts_received_bytes | 175 |
| cluster_posts_local_commits | 0 |
| cluster_posts_local_cert_failures | 0 |
| cluster_posts_local_replays | 0 |
| cluster_posts_local_send_queue | 0 |
| cluster_posts_local_send_queue_max | 2 |
| cluster_posts_local_send_queue_min | 0 |
| cluster_posts_local_send_queue_avg | 0.500000 |
| cluster_posts_local_recv_queue | 0 |
| cluster_posts_local_recv_queue_max | 2 |
| cluster_posts_local_recv_queue_min | 0 |
| cluster_posts_local_recv_queue_avg | 0.500000 |
| cluster_posts_local_cached_downto | 0 |
| cluster_posts_flow_control_paused_ns | 0 |
| cluster_posts_flow_control_paused | 0.000000 |
| cluster_posts_flow_control_sent | 0 |
| cluster_posts_flow_control_recv | 0 |
| cluster_posts_flow_control_interval | [ 100, 100 ] |
| cluster_posts_flow_control_interval_low | 100 |
| cluster_posts_flow_control_interval_high | 100 |
| cluster_posts_flow_control_status | OFF |
| cluster_posts_cert_deps_distance | 0.000000 |
| cluster_posts_apply_oooe | 0.000000 |
| cluster_posts_apply_oool | 0.000000 |
| cluster_posts_apply_window | 0.000000 |
| cluster_posts_commit_oooe | 0.000000 |
| cluster_posts_commit_oool | 0.000000 |
| cluster_posts_commit_window | 0.000000 |
| cluster_posts_local_state | 4 |
| cluster_posts_local_state_comment | Synced |
| cluster_posts_cert_index_size | 0 |
| cluster_posts_cert_bucket_count | 2 |
| cluster_posts_gcache_pool_size | 1320 |
| cluster_posts_causal_reads | 0 |
| cluster_posts_cert_interval | 0.000000 |
| cluster_posts_open_transactions | 0 |
| cluster_posts_open_connections | 0 |
| cluster_posts_ist_receive_status | |
| cluster_posts_ist_receive_seqno_start | 0 |
| cluster_posts_ist_receive_seqno_current | 0 |
| cluster_posts_ist_receive_seqno_end | 0 |
| cluster_posts_incoming_addresses | 127.0.0.1:9312,127.0.0.1:9350:replication |
| cluster_posts_cluster_weight | 1 |
| cluster_posts_desync_count | 0 |
| cluster_posts_evs_delayed | |
| cluster_posts_evs_evict_list | |
| cluster_posts_evs_repl_latency | 1.075e-06/7.957e-06/2.2911e-05/8.12112e-06/5 |
| cluster_posts_evs_state | OPERATIONAL |
| cluster_posts_gcomm_uuid | 95b52441-c296-11e9-abae-52c260760909 |
+------------------------------------------+----------------------------------------------+
71 rows in set (0.00 sec)
Кластер удаляется со всех узлов, но его индексы остаются нетронутыми и становятся простыми локальными нереплицируемыми индексами.
SELECT * FROM testrt;
MySQL [(none)]> SELECT * FROM testrt;
+------+------+
| id | gid |
+------+------+
| 1 | 10 |
+------+------+
1 row in set (0.10 sec)
Чтобы убедиться, что он действительно удален отовсюду, мы можем проверить статус другого узла:
exit;
MySQL [(none)]> exit;
Bye
mysql -P 9306 -h0
root@replication-5b59c59f5c-mkqfc:/# mysql -P 9306 -h0
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 3.1.0 445e806e@190716 release
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
SHOW STATUS LIKE 'cluster%';
MySQL [(none)]> SHOW STATUS LIKE 'cluster%';
+------------------------------------------+----------------------------------------------+
| Counter | Value |
+------------------------------------------+----------------------------------------------+
| cluster_name | posts |
| cluster_posts_state_uuid | 95c2ffc3-c296-11e9-b475-9fad1c2e6dab |
| cluster_posts_conf_id | 1 |
| cluster_posts_status | primary |
| cluster_posts_size | 1 |
| cluster_posts_local_index | 0 |
| cluster_posts_node_state | synced |
| cluster_posts_nodes_set | |
| cluster_posts_nodes_view | 127.0.0.1:9312,127.0.0.1:9350:replication |
| cluster_posts_indexes_count | 0 |
| cluster_posts_indexes | |
| cluster_posts_local_state_uuid | 95c2ffc3-c296-11e9-b475-9fad1c2e6dab |
| cluster_posts_protocol_version | 9 |
| cluster_posts_last_applied | 0 |
| cluster_posts_last_committed | 0 |
| cluster_posts_replicated | 0 |
| cluster_posts_replicated_bytes | 0 |
| cluster_posts_repl_keys | 0 |
| cluster_posts_repl_keys_bytes | 0 |
| cluster_posts_repl_data_bytes | 0 |
| cluster_posts_repl_other_bytes | 0 |
| cluster_posts_received | 2 |
| cluster_posts_received_bytes | 175 |
| cluster_posts_local_commits | 0 |
| cluster_posts_local_cert_failures | 0 |
| cluster_posts_local_replays | 0 |
| cluster_posts_local_send_queue | 0 |
| cluster_posts_local_send_queue_max | 2 |
| cluster_posts_local_send_queue_min | 0 |
| cluster_posts_local_send_queue_avg | 0.500000 |
| cluster_posts_local_recv_queue | 0 |
| cluster_posts_local_recv_queue_max | 2 |
| cluster_posts_local_recv_queue_min | 0 |
| cluster_posts_local_recv_queue_avg | 0.500000 |
| cluster_posts_local_cached_downto | 0 |
| cluster_posts_flow_control_paused_ns | 0 |
| cluster_posts_flow_control_paused | 0.000000 |
| cluster_posts_flow_control_sent | 0 |
| cluster_posts_flow_control_recv | 0 |
| cluster_posts_flow_control_interval | [ 100, 100 ] |
| cluster_posts_flow_control_interval_low | 100 |
| cluster_posts_flow_control_interval_high | 100 |
| cluster_posts_flow_control_status | OFF |
| cluster_posts_cert_deps_distance | 0.000000 |
| cluster_posts_apply_oooe | 0.000000 |
| cluster_posts_apply_oool | 0.000000 |
| cluster_posts_apply_window | 0.000000 |
| cluster_posts_commit_oooe | 0.000000 |
| cluster_posts_commit_oool | 0.000000 |
| cluster_posts_commit_window | 0.000000 |
| cluster_posts_local_state | 4 |
| cluster_posts_local_state_comment | Synced |
| cluster_posts_cert_index_size | 0 |
| cluster_posts_cert_bucket_count | 2 |
| cluster_posts_gcache_pool_size | 1320 |
| cluster_posts_causal_reads | 0 |
| cluster_posts_cert_interval | 0.000000 |
| cluster_posts_open_transactions | 0 |
| cluster_posts_open_connections | 0 |
| cluster_posts_ist_receive_status | |
| cluster_posts_ist_receive_seqno_start | 0 |
| cluster_posts_ist_receive_seqno_current | 0 |
| cluster_posts_ist_receive_seqno_end | 0 |
| cluster_posts_incoming_addresses | 127.0.0.1:9312,127.0.0.1:9350:replication |
| cluster_posts_cluster_weight | 1 |
| cluster_posts_desync_count | 0 |
| cluster_posts_evs_delayed | |
| cluster_posts_evs_evict_list | |
| cluster_posts_evs_repl_latency | 1.075e-06/7.957e-06/2.2911e-05/8.12112e-06/5 |
| cluster_posts_evs_state | OPERATIONAL |
| cluster_posts_gcomm_uuid | 95b52441-c296-11e9-abae-52c260760909 |
+------------------------------------------+----------------------------------------------+
71 rows in set (0.00 sec)
И мы видим, что кластер posts здесь тоже не существует.
Спасибо за чтение!
Эта статья дала вам базовое понимание того, как работает репликация в Manticore Search и какие основные команды можно использовать для настройки простого кластера.
