PXC集群参数之wsrep_on
admin
2023-04-15 20:21:25
0

修改wsrep_on参数值为off,drop表,打开另一个会话,发现表依旧存在。这个参数的主要作用是控制当前结点的写入是不是要复制到其他节点。与MySQL的sql_log_bin很相似。测试过程如下:

pxc01-->node1

mysql> show variables like 'wsrep_on';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| wsrep_on      | ON    |
+---------------+-------+
1 row in set (0.00 sec)

mysql> show status like 'wsrep%';
+----------------------------------+-------------------------------------------------------+
| Variable_name                    | Value                                                 |
+----------------------------------+-------------------------------------------------------+
| wsrep_local_state_uuid           | 23e153df-b664-11e9-89e3-ff2ae4f77a67                  |
| wsrep_protocol_version           | 9                                                     |
| wsrep_last_applied               | 16                                                    |
| wsrep_last_committed             | 16                                                    |
| wsrep_replicated                 | 1                                                     |
| wsrep_replicated_bytes           | 296                                                   |
| wsrep_repl_keys                  | 3                                                     |
| wsrep_repl_keys_bytes            | 48                                                    |
| wsrep_repl_data_bytes            | 178                                                   |
| wsrep_repl_other_bytes           | 0                                                     |
| wsrep_received                   | 6                                                     |
| wsrep_received_bytes             | 1206                                                  |
| wsrep_local_commits              | 1                                                     |
| wsrep_local_cert_failures        | 0                                                     |
| wsrep_local_replays              | 0                                                     |
| wsrep_local_send_queue           | 0                                                     |
| wsrep_local_send_queue_max       | 1                                                     |
| wsrep_local_send_queue_min       | 0                                                     |
| wsrep_local_send_queue_avg       | 0.000000                                              |
| wsrep_local_recv_queue           | 0                                                     |
| wsrep_local_recv_queue_max       | 1                                                     |
| wsrep_local_recv_queue_min       | 0                                                     |
| wsrep_local_recv_queue_avg       | 0.000000                                              |
| wsrep_local_cached_downto        | 14                                                    |
| wsrep_flow_control_paused_ns     | 0                                                     |
| wsrep_flow_control_paused        | 0.000000                                              |
| wsrep_flow_control_sent          | 0                                                     |
| wsrep_flow_control_recv          | 0                                                     |
| wsrep_flow_control_interval      | [ 173, 173 ]                                          |
| wsrep_flow_control_interval_low  | 173                                                   |
| wsrep_flow_control_interval_high | 173                                                   |
| wsrep_flow_control_status        | OFF                                                   |
| wsrep_cert_deps_distance         | 2.000000                                              |
| wsrep_apply_oooe                 | 0.000000                                              |
| wsrep_apply_oool                 | 0.000000                                              |
| wsrep_apply_window               | 1.000000                                              |
| wsrep_commit_oooe                | 0.000000                                              |
| wsrep_commit_oool                | 0.000000                                              |
| wsrep_commit_window              | 1.000000                                              |
| wsrep_local_state                | 4                                                     |
| wsrep_local_state_comment        | Synced                                                |
| wsrep_cert_index_size            | 5                                                     |
| wsrep_cert_bucket_count          | 22                                                    |
| wsrep_gcache_pool_size           | 2328                                                  |
| wsrep_causal_reads               | 0                                                     |
| wsrep_cert_interval              | 0.000000                                              |
| wsrep_open_transactions          | 0                                                     |
| wsrep_open_connections           | 0                                                     |
| wsrep_ist_receive_status         |                                                       |
| wsrep_ist_receive_seqno_start    | 0                                                     |
| wsrep_ist_receive_seqno_current  | 0                                                     |
| wsrep_ist_receive_seqno_end      | 0                                                     |
| wsrep_incoming_addresses         | 196.55.3.102:3308,196.55.3.102:3307,196.55.3.102:3306 |
| wsrep_cluster_weight             | 3                                                     |
| wsrep_desync_count               | 0                                                     |
| wsrep_evs_delayed                |                                                       |
| wsrep_evs_evict_list             |                                                       |
| wsrep_evs_repl_latency           | 0/0/0/0/0                                             |
| wsrep_evs_state                  | OPERATIONAL                                           |
| wsrep_gcomm_uuid                 | e0b9cedd-b698-11e9-90d1-8fe12b369d0b                  |
| wsrep_cluster_conf_id            | 3                                                     |
| wsrep_cluster_size               | 3                                                     |
| wsrep_cluster_state_uuid         | 23e153df-b664-11e9-89e3-ff2ae4f77a67                  |
| wsrep_cluster_status             | Primary                                               |
| wsrep_connected                  | ON                                                    |
| wsrep_local_bf_aborts            | 0                                                     |
| wsrep_local_index                | 2                                                     |
| wsrep_provider_name              | Galera                                                |
| wsrep_provider_vendor            | Codership Oy                      |
| wsrep_provider_version           | 3.37(r)                                               |
| wsrep_ready                      | ON                                                    |
+----------------------------------+-------------------------------------------------------+
71 rows in set (0.01 sec)

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| roidba             |
| sys                |
+--------------------+
5 rows in set (0.00 sec)

mysql> set wsrep_on=off;
Query OK, 0 rows affected (0.00 sec)

mysql> use roidba
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> show tables;
+------------------+
| Tables_in_roidba |
+------------------+
| t                |
| t1               |
+------------------+
2 rows in set (0.00 sec)

mysql> drop table t;
Query OK, 0 rows affected (0.01 sec)

mysql> 
mysql> show tables;
+------------------+
| Tables_in_roidba |
+------------------+
| t1               |
+------------------+
1 row in set (0.00 sec)

pxc02-->node2

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| roidba             |
| sys                |
+--------------------+
5 rows in set (0.00 sec)

mysql> use roidba;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> show tables;
+------------------+
| Tables_in_roidba |
+------------------+
| t                |
| t1               |
+------------------+
2 rows in set (0.00 sec)

相关内容

热门资讯

徐巧芯剖析赖清德:最怕自己丢掉... 海峡导报综合报道 大罢免投票一周年纪念活动26日举行,台北市长蒋万安出席并怒轰,民进党一年过后仍没有...
中国红十字会总会紧急向广东调拨... 记者从中国红十字会总会了解到,针对台风“红霞”给广东造成的灾情,中国红十字会总会启动四级应急响应,紧...
这些少年,正被“毒蛋”围猎 李梦抽了几口电子烟,吐出了白色的烟雾,有一股浓烈的水果香味。随后,她看着自己握电子烟的手,跟身边人说...
蒋万安号召“倒阁”,卢秀燕认为... 海峡导报综合报道 台北市长蒋万安27日抛出震撼议题,表示多名民代向他提议推动“倒阁”,要求台行政机构...
特朗普将在白宫会见两位重要客人 俄乌战争仍未结束,美伊冲突又有升级风险。在此背景下,美国总统特朗普将在白宫接见乌克兰和以色列领导人。...
新租客打扫卧室柜子上掉落4万元... 近日,莲前西路某小区内,张倩签下一套房子的租赁合同。当天上午,她带着12岁的大女儿周馨怡和11岁的小...
六部门通告:禁止涉军队退役报废... 关于禁止涉军队退役报废装备销售活动的通告近年来,部分经营者在线上线下公开销售涉及我军退役报废装备(指...
九寨沟景区发生泥石流,部分道路... 7月26日,九寨沟风景名胜区管理局发布泥石流灾害通报:2026年7月26日15时50分,九寨沟景区局...
空调26度不凉是什么原因 从空调内部元器件来说,不凉的原因有可能是温度传感器出现故障了,也有可能是空调压缩机或者铜管出现问题,...
鲸鸿动能携手香港国际机场、鸿蒙...   2026 年 7 月 25 日,十余位鸿蒙车主组成的车队从珠海出发,经港珠澳大桥通关抵达香港国际...