当前位置:   article > 正文

linux 上源码编译安装 PolarDB-X

linux 上源码编译安装 PolarDB-X

PolarDB-X 简介

PolarDB-X 是一款面向超高并发、海量存储、复杂查询场景设计的云原生分布式数据库系统。其采用 Shared-nothing 与存储计算分离架构,支持水平扩展、分布式事务、混合负载等能力,具备企业级、云原生、高可用、高度兼容 MySQL 系统及生态等特点。

PolarDB-X 最初为解决阿里巴巴天猫“双十一”核心交易系统数据库扩展性瓶颈而生,之后伴随阿里云一路成长,是一款经过多种核心业务场景验证的、成熟稳定的数据库系统。 PolarDB-X 的核心特性如下:

水平扩展
PolarDB-X 采用 Shared-nothing 架构进行设计,支持多种 Hash 和 Range 数据拆分算法,通过隐式主键拆分和数据分片动态调度,实现系统的透明水平扩展。

分布式事务
PolarDB-X 采用 MVCC + TSO 方案及 2PC 协议实现分布式事务。事务满足 ACID 特性,支持 RC/RR 隔离级别,并通过一阶段提交、只读事务、异步提交等优化实现事务的高性能。

混合负载
PolarDB-X 通过原生 MPP 能力实现对分析型查询的支持,通过 CPU quota 约束、内存池化、存储资源分离等实现了 OLTP 与 OLAP 流量的强隔离。

企业级
PolarDB-X 为企业场景设计了诸多内核能力,例如 SQL 限流、SQL Advisor、TDE、三权分立、Flashback Query 等。

云原生
PolarDB-X 在阿里云上有多年的云原生实践,支持通过 K8S Operator 管理集群资源,支持公有云、混合云、专有云等多种形态进行部署,并支持国产化操作系统和芯片。

高可用
通过多数派 Paxos 协议实现数据强一致,支持两地三中心、三地五副本等多种容灾方式,同时通过 Table Group、Geo-locality 等提高系统可用性。

兼容 MySQL 系统及生态
PolarDB-X 的目标是完全兼容 MySQL ,目前兼容的内容包括 MySQL 协议、MySQL 大部分语法、Collation、事务隔离级别、Binlog 等。

编译平台

PRETTY_NAME=“Ubuntu 22.04.4 LTS”
NAME=“Ubuntu”
VERSION_ID=“22.04”
VERSION=“22.04.4 LTS (Jammy Jellyfish)”
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian

源码编译

编译存在两种方式
第一种 直接使用现成的项目脚本 完成一键编译 一键部署 一键停止

git clone https://github.com/polardb/polardbx
cd polardbx
make 
# 启动
./build/run/bin/polardb-x.sh start
# 停止
./build/run/bin/polardb-x.sh stop
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7

另一种 如下文 称之为hard模式 参考本文 即可规避绝大多数问题

编译 DN 存储节点(代号polardbx-engine)

安装依赖
centos 未实测
yum install cmake3
ln -s /usr/bin/cmake3 /usr/bin/cmake


# 安装GCC7
yum install centos-release-scl
yum install devtoolset-7-gcc devtoolset-7-gcc-c++ devtoolset-7-binutils
echo "source /opt/rh/devtoolset-7/enable" >>/etc/profile

# 安装依赖
yum install make automake git openssl-devel ncurses-devel bison libaio-devel
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
ubuntu 操作

鉴于不同版本的不一致 故在此特此说明 当前ubuntu的版本 22.04 完整的版本信息 可参加 编译平台 章节

# 安装GCC7
# 官方文档中 使用 gcc-7 g++-7 但是尝试后 会报错 故修改为如下
apt install -y gcc g++
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 60 \
 --slave /usr/bin/g++ g++ /usr/bin/g++-7 
update-alternatives --config gcc
gcc --version
g++ --version

# 安装依赖
apt install make automake cmake git bison libaio-dev libncurses-dev libsasl2-dev libldap2-dev libssl-dev pkg-config
# 补充依赖包
sudo apt install libsnappy-dev zlib1g-dev libbz2-dev liblz4-dev
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13

特此说明: 在linux环境下 检查文件夹的所属目录权限以及用户组 是否和登录的用户匹配 ,不然可能导致文件读取不到 或者无法写入

下载源码
# git clone 或者 直接下载zip压缩包
git clone https://github.com/polardb/polardbx-engine.git
  • 1
  • 2
编译
# 保持网络畅通 
make -j8
make install
  • 1
  • 2
  • 3

接着就是等待编译完成

编译完成

会在编译的根目录的上级目录 或者本机目录生成一个 t-polardbx-engine-2.4.0
目录内结构如下:在这里插入图片描述
进入到opt里 即可看到 polardbx-engine 文件夹 里面存放就是编译后的内容

在这里插入图片描述
后续我们就基于此文件进行部署。

编译 CN 计算节点(代号polardbx-sql)

环境准备

maven 3.5 +
jdk 11 +

源码下载
# 最好使用这种方式 进行下载源码 不要直接下载zip包
git clone https://github.com/polardb/polardbx-sql.git

# 进入代码目录 
cd polardbx-sql/

# 确保 polardbx-rpc 子模块 (polardbx-glue) 已初始化
git submodule update --init

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
编译
# 编译打包
mvn install -D maven.test.skip=true -D env=release 
  • 1
  • 2
编译完成

编译完成后 在target目录下 即可看到压缩包
在这里插入图片描述
这个就是后续要安装的压缩包

编译 CDC 计算节点(代号polardbx-cdc)

环境准备

maven 3.5 +
jdk 11 +

源码下载
# 最好使用这种方式 进行下载源码 或者直接下载zip包
git https://github.com/polardb/polardbx-cdc.git
  • 1
  • 2
编译
# 编译打包
mvn install -D maven.test.skip=true -D env=release 
  • 1
  • 2
编译完成

编译完成后 在polardbx-cdc-assemble的target目录下 即可看到压缩包
在这里插入图片描述

这个就是后续要安装的压缩包

安装

安装过程注定不平凡,接下来开始安装

安装包准备

由于 CN 和 CDC 我是放在本机的 idea上编译的 所以后续需要统一放到一个 目录下 方便安装
如果都是在服务器上操作的 直接cp到同一个目录即可
在这里插入图片描述

安装 DN (代号:polardbx-engine)

  • 此步骤启动一个mysql进程,作为metadb和dn
  • 准备 mysql配置文件(my.cnf),可进行相应修改,默认使用 4886 作为 mysql端口,32886 作为私有协议端口
  • 默认使用 /usr/local/develop/PolarDB-X/polardbx_engine 作为mysql数据目录,可以修改成其他目录
根目录新建conf目录 新建 my.cnf 内容如下

重点配置说明 强制执行 rpc_port端口为32886 不然默认是33660 导致连接不上

[mysqld]
socket = /usr/local/develop/PolarDB-X/polardbx_engine/run/mysql.sock
datadir = /usr/local/develop/PolarDB-X/polardbx_engine/data
tmpdir = /usr/local/develop/PolarDB-X/polardbx_engine/tmp
log-bin = /usr/local/develop/PolarDB-X/polardbx_engine/log/mysql-bin.log
log-bin-index = /usr/local/develop/PolarDB-X/polardbx_engine/log/mysql-bin.index
# log-error = /usr/local/develop/PolarDB-X/polardbx_engine/slave/master-error.log
relay-log = /usr/local/develop/PolarDB-X/polardbx_engine/slave/slave-relay.log
relay-log-info-file = /usr/local/develop/PolarDB-X/polardbx_engine/slave/slave-relay-log.info
relay-log-index = /usr/local/develop/PolarDB-X/polardbx_engine/slave/slave-relay-log.index
master-info-file = /usr/local/develop/PolarDB-X/polardbx_engine/master/master.info
slow_query_log_file = /usr/local/develop/PolarDB-X/polardbx_engine/slow_query.log
innodb_data_home_dir = /usr/local/develop/PolarDB-X/polardbx_engine/innodb_data
innodb_log_group_home_dir = /usr/local/develop/PolarDB-X/polardbx_engine/innodb_log

port = 4886
# 新增的配置 必须要加 
rpc_port = 32886
loose_polarx_port = 32886
loose_galaxyx_port = 32886
loose_polarx_max_connections = 5000

loose_server_id = 476984231
loose_cluster-info = 127.0.0.1:14886@1
loose_cluster-id = 5431
loose_enable_gts = 1
loose_innodb_undo_retention=1800

core-file
loose_log_sql_info=1
loose_log_sql_info_index=1
loose_indexstat=1
loose_tablestat=1
default_authentication_plugin=mysql_native_password

# close 5.6 variables for 5.5
binlog_checksum=CRC32
log_bin_use_v1_row_events=on
explicit_defaults_for_timestamp=OFF
binlog_row_image=FULL
binlog_rows_query_log_events=ON
binlog_stmt_cache_size=32768

#innodb
innodb_data_file_path=ibdata1:100M;ibdata2:200M:autoextend
innodb_buffer_pool_instances=8
innodb_log_files_in_group=4
innodb_log_file_size=200M
innodb_log_buffer_size=200M
innodb_flush_log_at_trx_commit=1
#innodb_additional_mem_pool_size=20M #deprecated in 5.6
innodb_max_dirty_pages_pct=60
innodb_io_capacity_max=10000
innodb_io_capacity=6000
innodb_thread_concurrency=64
innodb_read_io_threads=8
innodb_write_io_threads=8
innodb_open_files=615350
innodb_file_per_table=1
innodb_flush_method=O_DIRECT
innodb_change_buffering=none
innodb_adaptive_flushing=1
#innodb_adaptive_flushing_method=keep_average #percona
#innodb_adaptive_hash_index_partitions=1      #percona
#innodb_fast_checksum=1                       #percona
#innodb_lazy_drop_table=0                     #percona
innodb_old_blocks_time=1000
innodb_stats_on_metadata=0
innodb_use_native_aio=1
innodb_lock_wait_timeout=50
innodb_rollback_on_timeout=0
innodb_purge_threads=1
innodb_strict_mode=1
#transaction-isolation=READ-COMMITTED
innodb_disable_sort_file_cache=ON
innodb_lru_scan_depth=2048
innodb_flush_neighbors=0
innodb_sync_array_size=16
innodb_print_all_deadlocks
innodb_checksum_algorithm=CRC32
innodb_max_dirty_pages_pct_lwm=10
innodb_buffer_pool_size=500M

#myisam
concurrent_insert=2
delayed_insert_timeout=300

#replication
slave_type_conversions="ALL_NON_LOSSY"
slave_net_timeout=4
skip-slave-start=OFF
sync_master_info=10000
sync_relay_log_info=1
master_info_repository=TABLE
relay_log_info_repository=TABLE
relay_log_recovery=0
slave_exec_mode=STRICT
#slave_parallel_type=DATABASE
slave_parallel_type=LOGICAL_CLOCK
loose_slave_pr_mode=TABLE
slave-parallel-workers=32

#binlog
server_id=193317851
binlog_cache_size=32K
max_binlog_cache_size=2147483648
loose_consensus_large_trx=ON
max_binlog_size=500M
max_relay_log_size=500M
relay_log_purge=OFF
binlog-format=ROW
sync_binlog=1
sync_relay_log=1
log-slave-updates=0
expire_logs_days=0
rpl_stop_slave_timeout=300
slave_checkpoint_group=1024
slave_checkpoint_period=300
slave_pending_jobs_size_max=1073741824
slave_rows_search_algorithms='TABLE_SCAN,INDEX_SCAN'
slave_sql_verify_checksum=OFF
master_verify_checksum=OFF

# parallel replay
binlog_transaction_dependency_tracking = WRITESET
transaction_write_set_extraction = XXHASH64


#gtid
gtid_mode=OFF
enforce_gtid_consistency=OFF

loose_consensus-io-thread_cnt=8
loose_consensus-worker-thread_cnt=8
loose_consensus_max_delay_index=10000
loose_consensus-election-timeout=10000
loose_consensus_max_packet_size=131072
loose_consensus_max_log_size=20M
loose_consensus_auto_leader_transfer=ON
loose_consensus_log_cache_size=536870912
loose_consensus_prefetch_cache_size=268435456
loose_consensus_prefetch_window_size=100
loose_consensus_auto_reset_match_index=ON
loose_cluster-mts-recover-use-index=ON
loose_async_commit_thread_count=128
loose_replicate-same-server-id=on
loose_commit_lock_done_count=1
loose_binlog_order_commits=OFF
loose_cluster-log-type-node=OFF

#thread pool
# thread_pool_size=32
# thread_pool_stall_limit=30
# thread_pool_oversubscribe=10
# thread_handling=pool-of-threads

#server
default-storage-engine=INNODB
character-set-server=utf8
lower_case_table_names=1
skip-external-locking
open_files_limit=615350
safe-user-create
local-infile=1
sql_mode='NO_ENGINE_SUBSTITUTION'
performance_schema=0


log_slow_admin_statements=1
loose_log_slow_verbosity=full
long_query_time=1
slow_query_log=0
general_log=0
loose_rds_check_core_file_enabled=ON

table_definition_cache=32768
eq_range_index_dive_limit=200
table_open_cache_instances=16
table_open_cache=32768

thread_stack=1024k
binlog_cache_size=32K
net_buffer_length=16384
thread_cache_size=256
read_rnd_buffer_size=128K
sort_buffer_size=256K
join_buffer_size=128K
read_buffer_size=128K

# skip-name-resolve
#skip-ssl
max_connections=36000
max_user_connections=35000
max_connect_errors=65536
max_allowed_packet=1073741824
connect_timeout=8
net_read_timeout=30
net_write_timeout=60
back_log=1024

loose_boost_pk_access=1
log_queries_not_using_indexes=0
log_timestamps=SYSTEM
innodb_read_ahead_threshold=0

loose_io_state=1
loose_use_myfs=0
loose_daemon_memcached_values_delimiter=':;:'
loose_daemon_memcached_option="-t 32 -c 8000 -p15506"

innodb_doublewrite=1
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146
  • 147
  • 148
  • 149
  • 150
  • 151
  • 152
  • 153
  • 154
  • 155
  • 156
  • 157
  • 158
  • 159
  • 160
  • 161
  • 162
  • 163
  • 164
  • 165
  • 166
  • 167
  • 168
  • 169
  • 170
  • 171
  • 172
  • 173
  • 174
  • 175
  • 176
  • 177
  • 178
  • 179
  • 180
  • 181
  • 182
  • 183
  • 184
  • 185
  • 186
  • 187
  • 188
  • 189
  • 190
  • 191
  • 192
  • 193
  • 194
  • 195
  • 196
  • 197
  • 198
  • 199
  • 200
  • 201
  • 202
  • 203
  • 204
  • 205
  • 206
  • 207
  • 208
  • 209
  • 210
  • 211

注意 如下配置 必须要加 不然导致连接不上的错误
rpc_port = 32886

文件夹创建 (根据数据存放目录来选择)
## polardbx_engine安装包 路径
cd /usr/local/develop/PolarDB-X/polardbx_engine
mkdir data innodb_data innodb_log log run master slave tmp
  • 1
  • 2
  • 3

在这里插入图片描述

启动msql

注意:启动 DN 需要使用非 root 账号完成

# DN根目录 
# 初始化
./bin/mysqld --defaults-file=/usr/local/develop/PolarDB-X/polardbx_engine/conf/my.cnf --initialize-insecure
# 启动  会在根目录输出一个 out.log
nohup ./bin/mysqld --defaults-file=/usr/local/develop/PolarDB-X/polardbx_engine/conf/my.cnf  >./out.log 2>&1 &
  • 1
  • 2
  • 3
  • 4
  • 5
启动日志
2024-07-31T02:35:49.100371-00:00 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2024-07-31T02:35:49.603104-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'Plugin polarx_rpc start up.'
2024-07-31T02:35:49.603949-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll start with detected 8 CPUs.'
2024-07-31T02:35:49.625232-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll start with 32 groups with each group 4 threads.'
2024-07-31T02:35:49.626200-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'Listen on port 33660.'
2024-07-31T02:35:49.853544-00:00 0 [System] [MY-025031] [XPaxos] [Recovery] Consensus_binlog_recovery::recover end , file_size 283, curr_position 283, m_current_index 0, m_start_pos 4, m_end_pos 4, m_valid_pos 283, m_valid_index 0, m_is_malformed 0, m_in_transaction 0, get_error_type  1, get_error 0, get_error_message 
2024-07-31T02:35:49.853582-00:00 0 [System] [MY-010229] [Server] Starting XA crash recovery...
2024-07-31T02:35:49.871148-00:00 0 [System] [MY-013911] [Server] Crash recovery finished in binlog engine. No attempts to commit, rollback or prepare any transactions.
2024-07-31T02:35:49.871195-00:00 0 [System] [MY-013911] [Server] Crash recovery finished in InnoDB engine. No attempts to commit, rollback or prepare any transactions.
2024-07-31T02:35:49.871220-00:00 0 [System] [MY-010232] [Server] XA crash recovery finished.
2024-07-31T02:36:07.931654-00:00 0 [System] [MY-025036] [XPaxos] [Proto] Server 1 : Paxos state change from FOLL to CAND !!
2024-07-31T02:36:07.934233-00:00 0 [System] [MY-025036] [XPaxos] [Proto] Server 1 : Start new requestVote: new term(2)
2024-07-31T02:36:07.934386-00:00 0 [System] [MY-025036] [XPaxos] [Proto] Server 1 : Paxos state change from CAND to LEDR !!
2024-07-31T02:36:07.936712-00:00 0 [System] [MY-025036] [XPaxos] [Proto] Server 1 : become Leader (currentTerm 2, lli:1, llt:2)!!
2024-07-31T02:36:07.936960-00:00 0 [System] [MY-025031] [XPaxos] [Recovery] Found max consensus index = [0] at Consensus_recovery_manager::get_max_consensus_index_from_recover_trx_hash
2024-07-31T02:36:07.937044-00:00 0 [System] [MY-025030] [XPaxos] start consensus_commit_pos_watcher thread
2024-07-31T02:36:08.028851-00:00 0 [System] [MY-025022] [Server] Gtid_in_table : 
2024-07-31T02:36:08.031908-00:00 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2024-07-31T02:36:08.032133-00:00 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2024-07-31T02:36:08.048248-00:00 0 [Warning] [MY-000067] [Server] unknown variable 'loose_polarx_port=32886'.
2024-07-31T02:36:08.048407-00:00 0 [Warning] [MY-000067] [Server] unknown variable 'loose_galaxyx_port=32886'.
2024-07-31T02:36:08.048428-00:00 0 [Warning] [MY-000067] [Server] unknown variable 'loose_polarx_max_connections=5000'.
2024-07-31T02:36:08.048446-00:00 0 [Warning] [MY-000067] [Server] unknown variable 'loose_enable_gts=1'.
2024-07-31T02:36:08.048460-00:00 0 [Warning] [MY-000067] [Server] unknown variable 'loose_log_sql_info=1'.
2024-07-31T02:36:08.048476-00:00 0 [Warning] [MY-000067] [Server] unknown variable 'loose_log_sql_info_index=1'.
2024-07-31T02:36:08.048488-00:00 0 [Warning] [MY-000067] [Server] unknown variable 'loose_indexstat=1'.
2024-07-31T02:36:08.048499-00:00 0 [Warning] [MY-000067] [Server] unknown variable 'loose_tablestat=1'.
2024-07-31T02:36:08.048518-00:00 0 [Warning] [MY-000067] [Server] unknown variable 'loose_slave_pr_mode=TABLE'.
2024-07-31T02:36:08.048531-00:00 0 [Warning] [MY-000067] [Server] unknown variable 'loose_async_commit_thread_count=128'.
2024-07-31T02:36:08.048545-00:00 0 [Warning] [MY-000067] [Server] unknown variable 'loose_commit_lock_done_count=1'.
2024-07-31T02:36:08.048568-00:00 0 [Warning] [MY-000067] [Server] unknown variable 'loose_log_slow_verbosity=full'.
2024-07-31T02:36:08.048579-00:00 0 [Warning] [MY-000067] [Server] unknown variable 'loose_rds_check_core_file_enabled=ON'.
2024-07-31T02:36:08.048591-00:00 0 [Warning] [MY-000067] [Server] unknown variable 'loose_boost_pk_access=1'.
2024-07-31T02:36:08.048602-00:00 0 [Warning] [MY-000067] [Server] unknown variable 'loose_io_state=1'.
2024-07-31T02:36:08.048614-00:00 0 [Warning] [MY-000067] [Server] unknown variable 'loose_use_myfs=0'.
2024-07-31T02:36:08.048632-00:00 0 [Warning] [MY-000067] [Server] unknown variable 'loose_daemon_memcached_values_delimiter=:;:'.
2024-07-31T02:36:08.048644-00:00 0 [Warning] [MY-000067] [Server] unknown variable 'loose_daemon_memcached_option=-t 32 -c 8000 -p15506'.
2024-07-31T02:36:08.092316-00:00 0 [System] [MY-000000] [Server] /usr/local/develop/PolarDB-X/polardbx_engine/bin/mysqld is using 'bundled jemalloc' Malloc Library.
2024-07-31T02:36:08.092367-00:00 0 [System] [MY-010931] [Server] /usr/local/develop/PolarDB-X/polardbx_engine/bin/mysqld: ready for connections. Version: '8.0.32-X-Cluster-8.4.19'  socket: '/usr/local/develop/PolarDB-X/polardbx_engine/run/mysql.sock'  port: 4886  Source distribution.
2024-07-31T02:36:08.092368-00:00 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /tmp/mysqlx.sock
2024-07-31T02:36:08.092602-00:00 0 [System] [MY-025030] [XPaxos] ConsensusLogManager::wait_follower_upgraded, consensus term: 2, consensus index: 0
2024-07-31T02:36:08.107541-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'CPUs changed from [] to [0,1,2,3,4,5,6,7].'
2024-07-31T02:36:08.172076-00:00 6 [System] [MY-025034] [XPaxos] [Applier] Apply thread start, recover status = 0, start apply index = 0, rli consensus index 0, consensus_ptr CommitIndex 1
2024-07-31T02:36:08.172256-00:00 6 [System] [MY-025034] [XPaxos] [Applier] Apply thread group relay log file name = '/usr/local/develop/PolarDB-X/polardbx_engine/log/mysql-bin.000001', pos = 252', next_index = 1, rli apply index = 0
2024-07-31T02:36:08.174116-00:00 6 [System] [MY-025034] [XPaxos] [Applier] mts_init_consensus_apply_index 0
2024-07-31T02:36:08.174156-00:00 6 [System] [MY-025034] [XPaxos] [Applier] Apply thread stop, opt_consensus_leader_stop_apply: false, seconds_behind_master: 1722393368, opt_consensus_leader_stop_apply_time: 0
2024-07-31T02:36:08.174181-00:00 6 [System] [MY-025034] [XPaxos] [Applier] Apply thread catchup commit index, consensus index: 0, current term: 1, apply term: 2, stop term: 2
2024-07-31T02:36:08.181957-00:00 0 [System] [MY-025030] [XPaxos] ConsensusLogManager::wait_follower_upgraded finish, error 0
2024-07-31T02:36:09.612000-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31735) 0:0(1,1) to CPUs [0,1,2,3].'
2024-07-31T02:36:09.619792-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31736) 0:1(1,1) to CPUs [0,1,2,3].'
2024-07-31T02:36:09.620287-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31737) 0:2(1,1) to CPUs [0,1,2,3].'
2024-07-31T02:36:09.620632-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31749) 3:2(1,1) to CPUs [4,5,6,7].'
2024-07-31T02:36:09.621009-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31740) 1:1(1,1) to CPUs [4,5,6,7].'
2024-07-31T02:36:09.621341-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31745) 2:2(1,1) to CPUs [0,1,2,3].'
2024-07-31T02:36:09.621708-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31741) 1:2(1,1) to CPUs [4,5,6,7].'
2024-07-31T02:36:09.621956-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31751) 4:0(1,1) to CPUs [0,1,2,3].'
2024-07-31T02:36:09.622339-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31746) 2:3(1,1) to CPUs [0,1,2,3].'
2024-07-31T02:36:09.622612-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31747) 3:0(1,1) to CPUs [4,5,6,7].'
2024-07-31T02:36:09.622935-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31739) 1:0(1,1) to CPUs [4,5,6,7].'
2024-07-31T02:36:09.623242-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31743) 2:0(1,1) to CPUs [0,1,2,3].'
2024-07-31T02:36:09.623631-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31738) 0:3(1,1) to CPUs [0,1,2,3].'
2024-07-31T02:36:09.625762-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31784) 12:1(1,1) to CPUs [0,1,2,3].'
2024-07-31T02:36:09.626034-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31809) 18:2(1,1) to CPUs [0,1,2,3].'
2024-07-31T02:36:09.626287-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31773) 9:2(1,1) to CPUs [4,5,6,7].'
2024-07-31T02:36:09.626572-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31755) 5:0(1,1) to CPUs [4,5,6,7].'
2024-07-31T02:36:09.626884-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31804) 17:1(1,1) to CPUs [4,5,6,7].'
2024-07-31T02:36:09.627192-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31857) 30:2(1,1) to CPUs [0,1,2,3].'
2024-07-31T02:36:09.627601-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31795) 15:0(1,1) to CPUs [4,5,6,7].'
2024-07-31T02:36:09.627878-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31815) 20:0(1,1) to CPUs [0,1,2,3].'
2024-07-31T02:36:09.628180-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31814) 19:3(1,1) to CPUs [4,5,6,7].'
2024-07-31T02:36:09.628406-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31753) 4:2(1,1) to CPUs [0,1,2,3].'
2024-07-31T02:36:09.628639-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31777) 10:2(1,1) to CPUs [0,1,2,3].'
2024-07-31T02:36:09.628884-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31762) 6:3(1,1) to CPUs [0,1,2,3].'
2024-07-31T02:36:09.629199-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31789) 13:2(1,1) to CPUs [4,5,6,7].'
2024-07-31T02:36:09.629409-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31750) 3:3(1,1) to CPUs [4,5,6,7].'
2024-07-31T02:36:09.629575-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31788) 13:1(1,1) to CPUs [4,5,6,7].'
2024-07-31T02:36:09.629775-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31769) 8:2(1,1) to CPUs [0,1,2,3].'
2024-07-31T02:36:09.629977-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31845) 27:2(1,1) to CPUs [4,5,6,7].'
2024-07-31T02:36:09.630185-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31831) 24:0(1,1) to CPUs [0,1,2,3].'
2024-07-31T02:36:09.630509-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31774) 9:3(1,1) to CPUs [4,5,6,7].'
2024-07-31T02:36:09.630834-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31802) 16:3(1,1) to CPUs [0,1,2,3].'
2024-07-31T02:36:09.631156-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31798) 15:3(1,1) to CPUs [4,5,6,7].'
2024-07-31T02:36:09.631480-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31854) 29:3(1,1) to CPUs [4,5,6,7].'
2024-07-31T02:36:09.631755-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31813) 19:2(1,1) to CPUs [4,5,6,7].'
2024-07-31T02:36:09.631911-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31757) 5:2(1,1) to CPUs [4,5,6,7].'
2024-07-31T02:36:09.632046-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31765) 7:2(1,1) to CPUs [4,5,6,7].'
2024-07-31T02:36:09.632169-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31859) 31:0(1,1) to CPUs [4,5,6,7].'
2024-07-31T02:36:09.632308-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31764) 7:1(1,1) to CPUs [4,5,6,7].'
2024-07-31T02:36:09.632531-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31759) 6:0(1,1) to CPUs [0,1,2,3].'
2024-07-31T02:36:09.632801-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31780) 11:1(1,1) to CPUs [4,5,6,7].'
2024-07-31T02:36:09.633125-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31800) 16:1(1,1) to CPUs [0,1,2,3].'
2024-07-31T02:36:09.633401-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31849) 28:2(1,1) to CPUs [0,1,2,3].'
2024-07-31T02:36:09.633635-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31754) 4:3(1,1) to CPUs [0,1,2,3].'
2024-07-31T02:36:09.633822-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31821) 21:2(1,1) to CPUs [4,5,6,7].'
2024-07-31T02:36:09.634124-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31797) 15:2(1,1) to CPUs [4,5,6,7].'
2024-07-31T02:36:09.634368-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31791) 14:0(1,1) to CPUs [0,1,2,3].'
2024-07-31T02:36:09.634619-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31805) 17:2(1,1) to CPUs [4,5,6,7].'
2024-07-31T02:36:09.634786-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31837) 25:2(1,1) to CPUs [4,5,6,7].'
2024-07-31T02:36:09.634974-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31846) 27:3(1,1) to CPUs [4,5,6,7].'
2024-07-31T02:36:09.635177-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31786) 12:3(1,1) to CPUs [0,1,2,3].'
2024-07-31T02:36:09.635391-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31748) 3:1(1,1) to CPUs [4,5,6,7].'
2024-07-31T02:36:09.635555-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31818) 20:3(1,1) to CPUs [0,1,2,3].'
2024-07-31T02:36:09.635774-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31744) 2:1(1,1) to CPUs [0,1,2,3].'
2024-07-31T02:36:09.635958-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31811) 19:0(1,1) to CPUs [4,5,6,7].'
2024-07-31T02:36:09.636182-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31776) 10:1(1,1) to CPUs [0,1,2,3].'
2024-07-31T02:36:09.636423-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31763) 7:0(1,1) to CPUs [4,5,6,7].'
2024-07-31T02:36:09.636619-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31856) 30:1(1,1) to CPUs [0,1,2,3].'
2024-07-31T02:36:09.636821-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31760) 6:1(1,1) to CPUs [0,1,2,3].'
2024-07-31T02:36:09.636985-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31827) 23:0(1,1) to CPUs [4,5,6,7].'
2024-07-31T02:36:09.637216-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31793) 14:2(1,1) to CPUs [0,1,2,3].'
2024-07-31T02:36:09.637486-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31803) 17:0(1,1) to CPUs [4,5,6,7].'
2024-07-31T02:36:09.637682-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31794) 14:3(1,1) to CPUs [0,1,2,3].'
2024-07-31T02:36:09.638100-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31807) 18:0(1,1) to CPUs [0,1,2,3].'
2024-07-31T02:36:09.638997-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31787) 13:0(1,1) to CPUs [4,5,6,7].'
2024-07-31T02:36:09.639170-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31844) 27:1(1,1) to CPUs [4,5,6,7].'
2024-07-31T02:36:09.639474-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31742) 1:3(1,1) to CPUs [4,5,6,7].'
2024-07-31T02:36:09.639673-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31772) 9:1(1,1) to CPUs [4,5,6,7].'
2024-07-31T02:36:09.639901-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31799) 16:0(1,1) to CPUs [0,1,2,3].'
2024-07-31T02:36:09.640152-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31825) 22:2(1,1) to CPUs [0,1,2,3].'
2024-07-31T02:36:09.640347-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31843) 27:0(1,1) to CPUs [4,5,6,7].'
2024-07-31T02:36:09.640592-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31833) 24:2(1,1) to CPUs [0,1,2,3].'
2024-07-31T02:36:09.640806-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31778) 10:3(1,1) to CPUs [0,1,2,3].'
2024-07-31T02:36:09.640984-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31782) 11:3(1,1) to CPUs [4,5,6,7].'
2024-07-31T02:36:09.641208-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31766) 7:3(1,1) to CPUs [4,5,6,7].'
2024-07-31T02:36:09.641383-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31835) 25:0(1,1) to CPUs [4,5,6,7].'
2024-07-31T02:36:09.641528-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31822) 21:3(1,1) to CPUs [4,5,6,7].'
2024-07-31T02:36:09.641724-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31819) 21:0(1,1) to CPUs [4,5,6,7].'
2024-07-31T02:36:09.641859-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31752) 4:1(1,1) to CPUs [0,1,2,3].'
2024-07-31T02:36:09.642058-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31783) 12:0(1,1) to CPUs [0,1,2,3].'
2024-07-31T02:36:09.642325-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31806) 17:3(1,1) to CPUs [4,5,6,7].'
2024-07-31T02:36:09.642442-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31796) 15:1(1,1) to CPUs [4,5,6,7].'
2024-07-31T02:36:09.642631-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31792) 14:1(1,1) to CPUs [0,1,2,3].'
2024-07-31T02:36:09.642821-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31812) 19:1(1,1) to CPUs [4,5,6,7].'
2024-07-31T02:36:09.643017-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31848) 28:1(1,1) to CPUs [0,1,2,3].'
2024-07-31T02:36:09.643217-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31810) 18:3(1,1) to CPUs [0,1,2,3].'
2024-07-31T02:36:09.643343-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31790) 13:3(1,1) to CPUs [4,5,6,7].'
2024-07-31T02:36:09.643541-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31852) 29:1(1,1) to CPUs [4,5,6,7].'
2024-07-31T02:36:09.643714-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31829) 23:2(1,1) to CPUs [4,5,6,7].'
2024-07-31T02:36:09.643878-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31756) 5:1(1,1) to CPUs [4,5,6,7].'
2024-07-31T02:36:09.644015-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31816) 20:1(1,1) to CPUs [0,1,2,3].'
2024-07-31T02:36:09.644166-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31761) 6:2(1,1) to CPUs [0,1,2,3].'
2024-07-31T02:36:09.644326-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31770) 8:3(1,1) to CPUs [0,1,2,3].'
2024-07-31T02:36:09.645302-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31855) 30:0(1,1) to CPUs [0,1,2,3].'
2024-07-31T02:36:09.645511-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31839) 26:0(1,1) to CPUs [0,1,2,3].'
2024-07-31T02:36:09.645684-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31801) 16:2(1,1) to CPUs [0,1,2,3].'
2024-07-31T02:36:09.645868-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31823) 22:0(1,1) to CPUs [0,1,2,3].'
2024-07-31T02:36:09.646047-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31834) 24:3(1,1) to CPUs [0,1,2,3].'
2024-07-31T02:36:09.646156-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31775) 10:0(1,1) to CPUs [0,1,2,3].'
2024-07-31T02:36:09.646324-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31779) 11:0(1,1) to CPUs [4,5,6,7].'
2024-07-31T02:36:09.646541-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31771) 9:0(1,1) to CPUs [4,5,6,7].'
2024-07-31T02:36:09.646780-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31862) 31:3(1,1) to CPUs [4,5,6,7].'
2024-07-31T02:36:09.646945-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31836) 25:1(1,1) to CPUs [4,5,6,7].'
2024-07-31T02:36:09.647126-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31820) 21:1(1,1) to CPUs [4,5,6,7].'
2024-07-31T02:36:09.647287-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31785) 12:2(1,1) to CPUs [0,1,2,3].'
2024-07-31T02:36:09.647478-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31850) 28:3(1,1) to CPUs [0,1,2,3].'
2024-07-31T02:36:09.647642-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31808) 18:1(1,1) to CPUs [0,1,2,3].'
2024-07-31T02:36:09.647820-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31851) 29:0(1,1) to CPUs [4,5,6,7].'
2024-07-31T02:36:09.648008-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31828) 23:1(1,1) to CPUs [4,5,6,7].'
2024-07-31T02:36:09.648193-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31758) 5:3(1,1) to CPUs [4,5,6,7].'
2024-07-31T02:36:09.648299-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31817) 20:2(1,1) to CPUs [0,1,2,3].'
2024-07-31T02:36:09.648443-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31767) 8:0(1,1) to CPUs [0,1,2,3].'
2024-07-31T02:36:09.648649-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31858) 30:3(1,1) to CPUs [0,1,2,3].'
2024-07-31T02:36:09.648898-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31840) 26:1(1,1) to CPUs [0,1,2,3].'
2024-07-31T02:36:09.649019-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31826) 22:3(1,1) to CPUs [0,1,2,3].'
2024-07-31T02:36:09.649142-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31832) 24:1(1,1) to CPUs [0,1,2,3].'
2024-07-31T02:36:09.649653-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31781) 11:2(1,1) to CPUs [4,5,6,7].'
2024-07-31T02:36:09.649872-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31860) 31:1(1,1) to CPUs [4,5,6,7].'
2024-07-31T02:36:09.650038-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31838) 25:3(1,1) to CPUs [4,5,6,7].'
2024-07-31T02:36:09.650228-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31853) 29:2(1,1) to CPUs [4,5,6,7].'
2024-07-31T02:36:09.650461-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31847) 28:0(1,1) to CPUs [0,1,2,3].'
2024-07-31T02:36:09.650631-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31830) 23:3(1,1) to CPUs [4,5,6,7].'
2024-07-31T02:36:09.650790-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31768) 8:1(1,1) to CPUs [0,1,2,3].'
2024-07-31T02:36:09.650944-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31842) 26:3(1,1) to CPUs [0,1,2,3].'
2024-07-31T02:36:09.651072-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31824) 22:1(1,1) to CPUs [0,1,2,3].'
2024-07-31T02:36:09.651232-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31861) 31:2(1,1) to CPUs [4,5,6,7].'
2024-07-31T02:36:09.651341-00:00 0 [Warning] [MY-000000] [Server] Plugin polarx_rpc reported: 'MtEpoll bind worker thread(tid:31841) 26:2(1,1) to CPUs [0,1,2,3].'
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146
  • 147
  • 148
  • 149
  • 150
  • 151
  • 152
  • 153
  • 154
  • 155
  • 156
  • 157
  • 158
  • 159
  • 160
  • 161
  • 162
  • 163
  • 164
  • 165
  • 166
  • 167
  • 168
  • 169
  • 170
  • 171
  • 172
  • 173
  • 174
  • 175
  • 176

如果看到如上日志 说明启动成功了

连接测试
# 指定socket连接 密码为空 直接回车就行
mysql -u root -S /usr/local/develop/PolarDB-X/polardbx_engine/run/mysql.sock -p
  • 1
  • 2

在这里插入图片描述

报错重试
## 清空目录下的文件 
rm -rf ./data/* ./innodb_data/* ./innodb_log/* ./log/* ./run/* ./master/* ./slave/* ./tmp/*
## 重复之前的启动过程
  • 1
  • 2
  • 3

安装 CN (代号:polardbx-sql)

启动mysql进程之后,便可以初始化PolarDB-X,需要准备以下几个配置:

metadb user:以下采用my_polarx
metadb database:创建metadb库,以下采用 polardbx_meta_db_polardbx
密码加密key(dnPasswordKey):以下采用 asdf1234ghjk5678
PolarDB-X默认用户名:默认为 polarx_root
PolarDB-X默认用户密码:默认为 123456,可通过 -S 参数修改
注意:启动 CN 需要使用非 root 账号完成

删除原有配置文件 conf/server.properties,在重新新建

路径配置使用 /usr/local/develop/PolarDB-X/polardbx-binlog 前缀 如果想替换 请全部替换
重点配置说明 galaxyXProtocol=2 必须要改成2 不然导致连接不上错误

Initialize gms failed due to: ERR-CODE: [PXC-10001][ERR_X_PROTOCOL_CLIENT] XDataSource to my_polarx#5204802@127.0.0.1:32886 Failed to init new TCP. XClientPool to my_polarx#5204802@127.0.0.1:32886 now 31 TCP(0 aging), 31 sessions(0 running, 0 idle), 0 waiting connection. 

  • 1
  • 2

# PolarDB-X 服务端口
serverPort=8527
# PolarDB-X RPC 端口
rpcPort=9090
managerPort=3406
charset=utf-8
processors=4
processorHandler=16
processorKillExecutor=128
syncExecutor=128
managerExecutor=128
serverExecutor=1024
idleTimeout=60000
trustedIps=127.0.0.1
slowSqlTime=1000
maxConnection=20000
allowManagerLogin=1
allowCrossDbQuery=true
enableLogicalDbWarmmingUp=true
# 必须要改 不然导致连接不上
galaxyXProtocol=2
# MetaDB地址
metaDbAddr=127.0.0.1:4886
# MetaDB私有协议端口
metaDbXprotoPort=32886
# MetaDB用户
metaDbUser=my_polarx
metaDbName=polardbx_meta_db_polardbx
instanceId=polardbx-polardbx
metaDbPasswd=27qEwnDfG/6sB/YCId+yQMEUYZmBPJyjvBjFcrnXKEo=
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
初始化 CN
#  CN 安装文件目录 
cd /usr/local/develop/PolarDB-X/polardbx-server-5.4.19

# 根目录执行 
bin/startup.sh \
    -I \
    -P asdf1234ghjk5678 \
    -d 127.0.0.1:4886:32886 \
    -r "" \
    -u polardbx_root \
    -S "123456"
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11

此步骤中会生成内部密码及加密密码,需要将其填写配置文件 conf/server.properties 中,用于后续访问:

Generate password for user: my_polarx && 3)(6)Q5^3+$rU1+%lL8!6*aT5(cM4x
Encrypted password: 27qEwnDfG/6sB/YCId+yaMEUYZmBxJyjvBjFcrnXKEo=
The property file is resident at resource file, skip saving password into it
 ======== Paste following configurations to conf/server.properties ! ======= 
metaDbPasswd=27qEwnDfG/6sB/YCId+yQMEUYZmaPJyjvBaFcrnXKEo=
 ======== Paste above configurations to conf/server.properties ! ======= 
Thu Aug 01 07:53:46 UTC 2024 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
create metadb database: polardbx_meta_db_polardbx
Thu Aug 01 07:53:46 UTC 2024 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
create user (my_polarx) on node (127.0.0.1:4886)
Thu Aug 01 07:53:46 UTC 2024 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
create user (my_polarx) on node (127.0.0.1:4886:32886)
Root user for polarx with password: polardbx_root && 123456
Encrypted password for polarx: UY1tQsgNvP8GJGGP8vHKKA==
Initialize polardbx success
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15

看到 Initialize polardbx success 表明初始化成功 部署成功了一大半
另外需要将生成的 密码 metaDbPasswd=27qEwnDfG/6sB/YCId+yQMEUYZmaPJyjvBaFcrnXKEo= 更新到 conf/server.properties 注意空格

启动CN
bin/startup.sh -P asdf1234ghjk5678
  • 1
观察启动日志

在这里插入图片描述
日志文件在根目录下的logs/tddl下 主要日志 tddl.log 和 meta-db.log 里

连接测试
# 在localhost下免密登录的 登录后即可看到 内容
mysql -h127.1 -P8527 -upolardbx_root
  • 1
  • 2

在这里插入图片描述
默认是没有数据库的 能登录进来 即可说明 DN部署成功

失败重试
# 登录 DN的数据库 删除 polardbx_meta_db_polardbx 库
mysql -u root -S /usr/local/develop/PolarDB-X/polardbx_engine/run/mysql.sock -p
drop databases polardbx_meta_db_polardbx;
# 删除 pid
# 重新启动会报错提示 pid具体的路径 直接删除即可 

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6

安装 CDC (代号:polardbx-cdc)

终于到了这里 。。。。。 继续开始

启动PolarDB-X进程之后,便可以初始化PolarDB-X CDC组件,需要准备以下几个配置:

metadb user:和启动PolarDB-X时设置的值保持一致,以下采用my_polarx
metadb database:和启动PolarDB-X时设置的值保持一致,以下采用 polardbx_meta_db_polardbx
metadb password:和启动PolarDB-X时设置的值保持一致,需使用密文,以下采用HMqvkvXZtT7XedA6t2IWY8+D7fJWIJir/mIY1Nf1b58=
metadb port:和启动MySQL时设置的值保持一致,以下采用 4886
密码加密key(dnPasswordKey):和启动PolarDB-X时设置的值保持一致,以下采用 asdf1234ghjk5678
PolarDB-X用户名:和启动PolarDB-X时设置的值保持一致,以下采用默认值 polardbx_root
PolarDB-X用户密码:和启动PolarDB-X时设置的值保持一致,需使用密文,以下采用默认值H1AzXc2NmCs61dNjH5nMvA==
PolarDB-X端口:和启动PolarDB-X时设置的值保持一致,以下采用默认值 8527
当前机器分配给CDC使用的内存大小:以下采用16000代指,单位为M,实际配置值请替换为真实值
注意:启动 CDC 需要使用非 root 账号完成

删除config/server.properties 文件 并重新创建一个 内容如下

重点说明
内存配置 mem_size 单位MB 根据实际自己可用的来
磁盘大小 单位MB disk_size 根据实际自己可用的来
日志以及其他文件的 持久化目录 默认为 /usr/local/develop/PolarDB-X/polardbx-binlog/ 可按照实际修改 然后批量替换即可


#
# 基础配置
#
config_scan_period_second=2
polardbx_instance_id=polardbx-polardbx
cluster_id=cluster_1
ins_id=1001
ins_ip=127.0.0.1
daemon_port=3007
ssh_port=3008
common_ports={"cdc1_port":"3009","cdc3_port":"3011","cdc2_port":"3010","cdc6_port":"3014","cdc5_port":"3013","cdc4_port":"3012"}
cpu_cores=4
# 内存大小
mem_size=4096
# 磁盘大小 单位MB 
disk_size=10240
rds_uid=
rds_bid=
rds_api_url=http://rds-api.control.internal.rds.aliyuncs.com:8087/services
rds_api_access_id=
rds_api_access_key=
# CLUSTER
runtime_mode=LOCAL_SINGLE
print_metrics=true
interface_acl_enabled=false
cluster_type=
assigned_dn_ip=
storage.persistBasePath=/usr/local/develop/PolarDB-X/polardbx-binlog/logs/rocksdb
binlog.dir.path=/usr/local/develop/PolarDB-X/polardbx-binlog/binlog/

dnPasswordKey=asdf1234ghjk5678
# 修改
useEncryptedPassword=true
# 新增
polardbx.instance.id=polardbx-polardbx
sigar_enabled=true
latest_server_address_persist_file=/usr/local/develop/PolarDB-X/polardbx-binlog/env/latest_server_addr.json
latest_server_address_flush_interval=30
cluster_role=master
is_lab_env=false
force_reset_enable=false
release_note_path=/usr/local/develop/PolarDB-X/polardbx-binlog/releaseNote
# Storage相关的参数配置
#
storage_persist_enabled=true
storage_persist_txn_entity_enabled=true
storage_persist_mode=AUTO
storage_persist_all_threshold=0.95
storage_persist_new_threshold=0.85
storage_persist_check_interval_mills=10
storage_persist_txn_threshold=104857600
storage_persist_txnitem_threshold=52428800
storage_persist_base_path=/usr/local/develop/PolarDB-X/polardbx-binlog/logs/rocksdb
storage_persist_delete_mode=SINGLE
storage_persist_unit_count=3
storage_clean_worker_count=4
storage_clean_buffer_size=10000
storage_parallel_restore_enabled=true
storage_parallel_restore_parallelism=4
storage_parallel_restore_batch_size=100
storage_parallel_restore_max_event_size=5242880
#
# metadb的数据库配置
#
metaDb_url=jdbc:mysql://127.0.0.1:4886/polardbx_meta_db_polardbx?useSSL=false
metaDb_username=my_polarx
metaDb_password=27qEwnDfG/6sB/YCId+yQMEUYZmBPJyjvBjFcrnXKEo=
metadb_scan_switch=true
metadb_scan_interval_seconds=30
#
# polarx server的数据库配置
#
polarx_url=jdbc:mysql://127.0.0.1:8527/__cdc__
polarx_username=polardbx_root
polarx_password=UY1tQsgNvP8GJGGP8vHKKA==
#
# datasource相关
#
datasource_max_active=60
datasource_max_wait=600000
datasource_check_valid_timeout_sec=1
#
# Task和Dumper之间,Txn Stream相关参数
#
binlog_txn_stream_packet_mode=BYTES
binlog_txn_stream_client_async_enabled=true
binlog_txn_stream_client_receive_queue_size=64
binlog_txn_stream_flow_control_window_size=800
#
# 逻辑Binlog目录&文件&上传下载等相关配置
#
binlog_dir_path=/usr/local/develop/PolarDB-X/polardbx-binlog/binlog
binlog_disk_max_size_mb=524288000
binlog_file_size=524288000
binlog_file_seek_buffer_size=256
binlog_file_seek_last_tso_mode=0
binlog_write_dry_run_enabled=false
binlog_write_dry_run_mode=1
binlog_write_rows_query_event_enabled=true
binlog_write_check_rows_query_event=false
binlog_write_check_server_id=true
binlog_write_check_server_id_target_value=
binlog_write_check_tso=true
binlog_write_buffer_size=1048576
binlog_write_buffer_direct_enabled=true
binlog_write_flush_policy=0
binlog_write_flush_interval=1000
binlog_write_heartbeat_interval=30
binlog_write_heartbeat_as_txn=true
binlog_write_tableid_base_value=0
binlog_parallel_build_enabled=true
binlog_parallel_build_parallelism=1
binlog_parallel_build_with_batch=true
binlog_parallel_build_ring_buffer_size=65536
binlog_parallel_build_max_slot_size=1024
binlog_parallel_build_max_slot_payload_size=8192
binlog_sync_read_buffer_size=1048576
binlog_sync_packet_size=1048576
binlog_sync_client_async_enabled=true
binlog_sync_client_receive_queue_size=64
binlog_sync_flow_control_window_size=800
binlog_sync_event_split_mode=CLIENT
binlog_sync_inject_trouble_enabled=false
binlog_sync_check_file_status_interval_second=5
binlog_dump_packet_size=2097152
binlog_dump_read_buffer_size=33554432
binlog_dump_master_heartbeat_period=1000000000
binlog_dump_m_event_checksum_alg=CRC32
binlog_dump_check_checksum_alg_switch=true
binlog_dump_back_pressure_sleep_time_us=1000
binlog_dump_wait_cursor_ready_times_limit=6
binlog_dump_wait_cursor_ready_retry_interval_second=5
binlog_dump_test_streaming_consume_enabled=false
binlog_dump_force_streaming_consume_enabled=false
binlog_dump_download_path=/usr/local/develop/PolarDB-X/polardbx-binlog/logs/binlogdump
binlog_dump_download_first_mode=true
binlog_dump_download_window_size=5
binlog_dump_download_error_retry_times=10
binlog_dump_download_max_wait_seconds=500
binlog_backup_type=NULL
binlog_backup_file_preserve_days=15
binlog_backup_purged_record_preserve_days=7
binlog_backup_upload_mode=MULTI_PART
binlog_backup_upload_buffer_size=1048576
binlog_backup_upload_max_thread_num=32
binlog_backup_upload_multi_append_threshold=4
binlog_backup_upload_part_size=10485760
binlog_backup_upload_wait_data_timeout_ms=10000
binlog_backup_download_mode=PARALLEL
binlog_backup_download_part_size=52428800
binlog_backup_download_max_thread_num=10
binlog_backup_download_last_file_count=1
binlog_backup_force_download_enabled=false
binlog_backup_download_link_preserve_seconds=43200
binlog_purge_check_interval_minute=1
binlog_purge_disk_use_ratio=0.9
binlog_purge_enabled=true
binlog_recover_mode_with_dumper_slave=SYNC
binlog_recover_tso_overwrite_config=[]
binlog_ddl_set_table_group_enabled=true
binlog_ddl_alter_manually_table_group_enabled=true
binlog_ddl_alter_implicit_table_group_enabled=true
#
# 中心化存储相关参数
#
oss_endpoint=
oss_bucket_name=
oss_access_key_id=
oss_access_key_secret=
lindorm_endpoint=
lindorm_thrift_port=8053
lindorm_s3_port=9053
lindorm_bucket_name=
lindorm_access_key_id=
lindorm_access_key_secret=
#
# Daemon和拓扑相关的配置
#
daemon_heartbeat_interval_ms=1000
daemon_watch_cluster_interval_ms=5000
daemon_watch_cluster_heartbeat_timeout_ms=10000
daemon_watch_cluster_wait_start_timeout_ms=10000
daemon_watch_work_process_interval_ms=1000
daemon_watch_work_process_heartbeat_timeout_ms=2000
daemon_watch_work_process_blacklist=MysqlDumpStressTest
daemon_watch_history_resource_interval_minute=60
daemon_watch_replica_in_binlog_cluster_enabled=true
daemon_tso_heartbeat_interval_ms=200
daemon_tso_heartbeat_self_adaption_enabled=false
daemon_tso_heartbeat_self_adaption_target_interval=10
daemon_tso_heartbeat_self_adaption_eps_threshold=300000
daemon_rest_api_acl_ak=
daemon_rest_api_acl_sk=
daemon_force_refresh_topology_interval=0
daemon_support_refresh_topology_only_daemon_down=false
daemon_wait_task_start_timeout_second=5
daemon_wait_task_stop_timeout_second=30
daemon_wait_clean_binlog_timeout_second=5
# ON / OFF
daemon_dn_health_checker_switch=ON
daemon_dn_health_checker_interval=10
daemon_dn_health_checker_connection_timeout_second=30
daemon_dn_health_checker_sla_limit_second=120
# 开启异常注入
daemon_dn_health_checker_error_inject=false
daemon_dn_health_checker_retry_num=10
# 开启定时flush log测试
daemon_auto_flush_log_test=false
topology_node_minsize=1
topology_work_process_heartbeat_interval_ms=1000
topology_use_relay_task_threshold_with_dn_num=1024
topology_resource_use_ratio=0.9
topology_resource_dumper_weight=2
topology_resource_dumper_slave_max_mem=8192
topology_resource_task_weight=4
topology_repair_storage_with_scale_enabled=true
topology_recover_tso_type=BINLOG_RECORD
topology_recover_tso_time_limit=8
topology_recover_tso_binlog_num_limit=50
topology_force_use_recover_tso_enabled=false
columnar_process_heartbeat_timeout_ms=600000
#
# Task相关的配置
#
task_engine_auto_start=false
task_merge_xa_without_tso=false
task_merge_dry_run=false
task_merge_dry_run_mode=1
task_merge_group_unit_size=8
task_merge_group_queue_size=256
task_merge_group_max_level=2
task_merge_source_queue_size=512
task_merge_source_queue_max_total_size=20480
task_merge_force_complete_heartbeat_window_time_limit=10
task_merge_check_heartbeat_window_enabled=true
task_transmit_dry_run=false
task_transmit_dry_run_mode=1
task_transmit_chunk_mode=MEMSIZE
task_transmit_chunk_item_size=10240
task_transmit_max_message_size=104857600
task_transmit_queue_size=1024
task_transmit_dumping_queue_size=64
task_collect_merge_stage_parallelism=4
task_collect_build_packet_size_limit=65536
task_collect_queue_size=8192
task_extract_log_trans=false
task_extract_log_trans_detail=false
task_extract_log_event=false
task_extract_remove_hints_in_ddl_sql=false
task_extract_skip_duplicate_txn_key=false
task_extract_filter_logic_table_blacklist=
task_extract_filter_logic_db_blacklist=
task_extract_filter_physical_table_blacklist=
task_extract_filter_trans_blacklist=
task_extract_filter_trans_threshold=500
task_extract_disorder_trace_id_allowed=false
task_extract_sort_hold_size=-1
task_extract_transaction_group_size=10000
task_extract_watch_memory_leak_enabled=false
task_extract_rebuild_data_log=false
task_reformat_column_type_enabled=true
task_reformat_attach_private_ddl_enabled=true
task_reformat_attach_drds_hidden_pk_enabled=false
task_reformat_ignore_mismatched_column_error=false
task_reformat_event_force_enabled=false
task_reformat_ddl_algorithm_blacklist=OMC,OMC_INDEX
task_reformat_ddl_hint_blacklist=GSI_BACKFILL_POSITION_MARK,FP_PAUSE_AFTER_DDL_TASK_EXECUTION,FP_STATISTIC_SAMPLE_ERROR
task_reformat_no_foreign_key_check=true
task_dump_offline_binlog_forced=false
task_dump_offline_binlog_recall_days_limit=10
task_dump_offline_binlog_prefer_host_instances=
task_dump_offline_binlog_in_download_mode=false
task_dump_offline_binlog_download_dir=/usr/local/develop/PolarDB-X/polardbx-binlog/logs/rdsbinlog
task_dump_offline_binlog_download_thread_init_num=3
task_dump_offline_binlog_download_thread_max_num=10
task_dump_offline_binlog_download_disk_limit_per_dn=5120
task_dump_offline_binlog_download_disk_limit_total=204800
task_dump_offline_binlog_cache_mode=AUTO
task_dump_offline_binlog_cache_unit_size=31457280
task_dump_offline_binlog_cache_size_limit=566231040
task_dump_same_region_storage_binlog=true
task_recover_check_previous_dn_change=false
task_recover_search_tso_in_quick_mode=false
task_recover_force_quick_search_when_loss_backup=true
task_recover_search_tso_with_v1_algorithm=false
#
# 报警相关的参数配置
#
alarm_nodata_threshold_second=120
alarm_delay_threshold_second=300
alarm_report_alarm_event_enabled=true
alarm_latest_consume_time_ms=0
alarm_check_consumer_interval_ms=60000
alarm_fatal_threshold_ms=7200000
#
# meta相关的控制参数
#
meta_recover_rollback_mode=SNAPSHOT_EXACTLY
meta_recover_force_use_snapshot_exactly_mode=false
meta_retrieve_instant_create_table_modes=SNAPSHOT_SEMI,SNAPSHOT_UNSAFE
meta_build_check_consistency_enabled=false
meta_build_log_table_meta_detail_enabled=false
meta_build_semi_snapshot_enabled=true
meta_build_semi_snapshot_preserve_hours=720
meta_build_semi_snapshot_check_delta_interval_sec=60
meta_build_apply_from_history_first=false
meta_build_full_snapshot_threshold=100000
meta_build_snapshot_retry_times=10
meta_build_full_snapshot_check_interval_sec=3600
meta_build_record_sql_with_exists_enabled=false
meta_build_physical_ddl_sql_blacklist_regex=^(create|alter|drop)\\s+table\\s+(`)?(__drds_global_tx_log|polarx_global_trx_log)(`)?(\\s*\\(|\\s+).*,^create\\s+(definer\\s*=\\s*('|`)\\w+('|`)@('|`)[\\w|\\.|%]+('|`)\\s+)?(function|procedure)\\s+.*,^create\\s+sequence.*,^drop\\s+sequence.*,^drop\\s+procedure.*,^drop\\s+function.*,^alter\\s+user\\s+.*,^grant\\s+.*,^savepoint.*,^rollback\\s+(work\\s+)?to\\s+savepoint.*,^release\\s+savepoint.*
meta_build_logic_ddl_db_blacklist=polardbx
meta_build_logic_ddl_table_blacklist=
meta_build_logic_ddl_tso_blacklist=
meta_build_share_topology_enabled=OFF
meta_build_share_topology_with_intern=false
meta_build_ignore_apply_error=false
meta_build_snapshot_error_inject=false
meta_build_record_ignored_ddl_enabled=false
meta_alarm_logic_ddl_count_threshold=100000
meta_alarm_physical_ddl_count_threshold=500000
meta_purge_physical_ddl_threshold=500000
meta_purge_mark_ddl_threshold=10000
meta_purge_logic_ddl_soft_delete_enabled=false
meta_persist_base_path=/usr/local/develop/PolarDB-X/polardbx-binlog/logs/rocksdb_meta
meta_persist_enabled=OFF
meta_cache_compare_result_enabled=true
meta_cache_table_meta_max_size=8192
meta_cache_table_meat_expire_time_minutes=60
meta_write_all_variable_to_db_switch=false
#
# FlashBack相关的参数
#
flashback_binlog_files_count_per_task=5
flashback_binlog_write_buffer_sql_size=163840
flashback_binlog_write_buffer_byte_size=536870912
flashback_binlog_download_dir=/usr/local/develop/PolarDB-X/polardbx-binlog/binlog
flashback_binlog_max_download_file_count=200
flashback_binlog_download_thread_num=10
flashback_download_link_preserve_second=1296000
flashback_upload_multi_mode_threshold=5368709120
#
# Binlog-X相关参数
#
binlogx_rocksdb_base_path=/usr/local/develop/PolarDB-X/polardbx-binlog/logs/rocksdb_x
binlogx_auto_init=true
binlogx_stream_group_name=
binlogx_stream_count=
binlogx_dir_path_prefix=/usr/local/develop/PolarDB-X/polardbx-binlog/binlog
binlogx_wait_latest_tso_timeout_second=30
binlogx_schedule_dispatcher_count_per_node=1
binlogx_schedule_dispatcher_memory_unit=10240
binlogx_schedule_dispatcher_memory_min=1024
binlogx_schedule_dispatcher_rocksdb_ratio=0.1
binlogx_transmit_relay_engine_type=FILE
binlogx_transmit_relay_file_max_size=104857600
binlogx_transmit_read_batch_item_size=200
binlogx_transmit_read_batch_byte_size=10485760
binlogx_transmit_read_file_buffer_size=1048576
binlogx_transmit_read_log_detail_enabled=false
binlogx_transmit_write_batch_size=100
binlogx_transmit_write_parallelism=4
binlogx_transmit_write_queue_size=256
binlogx_transmit_write_file_buffer_size=1048576
binlogx_transmit_write_file_buffer_use_direct_mem=true
binlogx_transmit_write_file_flush_interval_ms=100
binlogx_transmit_write_slowdown_threshold=250
binlogx_transmit_write_slowdown_speed=1048576
binlogx_transmit_write_stop_threshold=500
binlogx_transmit_write_log_detail_enabled=false
binlogx_transmit_hash_level=
binlogx_record_level_hash_db_list=
binlogx_record_level_hash_table_list=
binlogx_db_level_hash_db_list=
binlogx_db_level_hash_table_list=
binlogx_table_level_hash_db_list=
binlogx_table_level_hash_table_list=
binlogx_table_level_hash_table_list_regex=
binlogx_clean_old_version_binlog_enabled=true
binlogx_clean_relay_data_enabled=true
binlogx_clean_relay_data_interval_minute=1
binlogx_txn_stream_flow_control_window_max_size=1000
binlogx_file_seek_buffer_max_total_size=512
binlogx_kway_source_queue_size=128
#
# Replica相关参数
#
rpl_persist_base_path=/usr/local/develop/PolarDB-X/polardbx-binlog/logs/rocksdb_rpl/
rpl_task_support_running_check=true
rpl_single_task_memory_when_distribute=1500
rpl_random_compare_all=false
rpl_rocksdb_deserialize_parallelism=1
rpl_default_ignore_db_list=sys,mysql,information_schema
rpl_default_sql_mode=NO_AUTO_VALUE_ON_ZERO
rpl_pool_cn_black_ip_list=
rpl_task_keep_alive_interval_seconds=72000
# 同时影响闪回和replica
rpl_filter_table_error=false
rpl_persist_schema_meta_enabled=OFF
rpl_table_meta_max_cache_size=8192
rpl_table_meta_expire_time_minutes=60
rpl_state_metrics_flush_interval_second=5
rpl_ddl_retry_interval_mills=1000
rpl_ddl_retry_max_count=20
rpl_ddl_wait_align_interval_mills=50
rpl_ddl_apply_columnar_enabled=false
rpl_delay_alarm_threshold_second=900
rpl_ddl_parse_error_process_mode=0
rpl_error_sql_truncate_length=300
rpl_full_valid_min_batch_rows_count=5000000
rpl_full_valid_min_batch_byte_size=100000000
rpl_full_valid_batch_size=1000000
rpl_full_valid_max_sample_percentage=1.0
rpl_full_valid_max_sample_rows_count=100000
rpl_full_valid_parallelism=1
rpl_full_valid_max_persist_rows_count=5000000
rpl_full_valid_records_per_second=1000000
rpl_repair_parallelism=20
rpl_full_valid_skip_collect_statistic=false
rpl_full_valid_auto_reset_error_tasks=true
rpl_set_max_statement_time_option=false
rpl_async_ddl_enabled=false
rpl_async_ddl_threshold_in_second=600
rpl_parallel_schema_apply_enabled=false
rpl_parallel_schema_channel_enabled=true
rpl_parallel_schema_channel_parallelism=10000
rpl_parallel_schema_apply_batch_size=32768
rpl_parallel_table_apply_enabled=false
rpl_connection_init_sql=set enable_auto_savepoint = true;set foreign_key_checks = 0;set enable_foreign_key = true;set enable_create_expression_index = true;set enable_unique_key_on_gen_col=true;set transaction_policy = 'XA';
rpl_apply_use_cached_thread_pool_enabled=false
rpl_default_memory=2048
rpl_full_valid_max_batch_rows_count=10000000
rpl_full_valid_max_batch_size=500000000
rpl_full_valid_runner_thread_pool_core_size=10
rpl_full_valid_runner_thread_pool_max_size=20
rpl_full_valid_runner_thread_pool_keep_alive_time_seconds=120
rpl_full_valid_runner_thread_pool_queue_size=1024
rpl_full_valid_cn_conn_pool_count=10
rpl_full_valid_mock_sample=false
rpl_full_valid_check_detail_fetch_size=1024
rpl_extractor_ddl_log_open=false
#
# 实验室相关参数
#
# 开启action log表配置支持
test_open_binlog_lab_event_support=false
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146
  • 147
  • 148
  • 149
  • 150
  • 151
  • 152
  • 153
  • 154
  • 155
  • 156
  • 157
  • 158
  • 159
  • 160
  • 161
  • 162
  • 163
  • 164
  • 165
  • 166
  • 167
  • 168
  • 169
  • 170
  • 171
  • 172
  • 173
  • 174
  • 175
  • 176
  • 177
  • 178
  • 179
  • 180
  • 181
  • 182
  • 183
  • 184
  • 185
  • 186
  • 187
  • 188
  • 189
  • 190
  • 191
  • 192
  • 193
  • 194
  • 195
  • 196
  • 197
  • 198
  • 199
  • 200
  • 201
  • 202
  • 203
  • 204
  • 205
  • 206
  • 207
  • 208
  • 209
  • 210
  • 211
  • 212
  • 213
  • 214
  • 215
  • 216
  • 217
  • 218
  • 219
  • 220
  • 221
  • 222
  • 223
  • 224
  • 225
  • 226
  • 227
  • 228
  • 229
  • 230
  • 231
  • 232
  • 233
  • 234
  • 235
  • 236
  • 237
  • 238
  • 239
  • 240
  • 241
  • 242
  • 243
  • 244
  • 245
  • 246
  • 247
  • 248
  • 249
  • 250
  • 251
  • 252
  • 253
  • 254
  • 255
  • 256
  • 257
  • 258
  • 259
  • 260
  • 261
  • 262
  • 263
  • 264
  • 265
  • 266
  • 267
  • 268
  • 269
  • 270
  • 271
  • 272
  • 273
  • 274
  • 275
  • 276
  • 277
  • 278
  • 279
  • 280
  • 281
  • 282
  • 283
  • 284
  • 285
  • 286
  • 287
  • 288
  • 289
  • 290
  • 291
  • 292
  • 293
  • 294
  • 295
  • 296
  • 297
  • 298
  • 299
  • 300
  • 301
  • 302
  • 303
  • 304
  • 305
  • 306
  • 307
  • 308
  • 309
  • 310
  • 311
  • 312
  • 313
  • 314
  • 315
  • 316
  • 317
  • 318
  • 319
  • 320
  • 321
  • 322
  • 323
  • 324
  • 325
  • 326
  • 327
  • 328
  • 329
  • 330
  • 331
  • 332
  • 333
  • 334
  • 335
  • 336
  • 337
  • 338
  • 339
  • 340
  • 341
  • 342
  • 343
  • 344
  • 345
  • 346
  • 347
  • 348
  • 349
  • 350
  • 351
  • 352
  • 353
  • 354
  • 355
  • 356
  • 357
  • 358
  • 359
  • 360
  • 361
  • 362
  • 363
  • 364
  • 365
  • 366
  • 367
  • 368
  • 369
  • 370
  • 371
  • 372
  • 373
  • 374
  • 375
  • 376
  • 377
  • 378
  • 379
  • 380
  • 381
  • 382
  • 383
  • 384
  • 385
  • 386
  • 387
  • 388
  • 389
  • 390
  • 391
  • 392
  • 393
  • 394
  • 395
  • 396
  • 397
  • 398
  • 399
  • 400
  • 401
  • 402
  • 403
  • 404
  • 405
  • 406
  • 407
  • 408
  • 409
  • 410
  • 411
  • 412
  • 413
  • 414
  • 415
  • 416
  • 417
  • 418
  • 419
  • 420
  • 421
  • 422
  • 423
  • 424
  • 425
  • 426
  • 427
  • 428
  • 429
  • 430
  • 431
  • 432
  • 433
  • 434
  • 435
  • 436
  • 437
  • 438
  • 439
  • 440
  • 441
  • 442
  • 443
  • 444
  • 445
  • 446
  • 447
启动 CDC

接下来,即可启动CDC daemon进程,命令如下所示。启动之后,通过jps命令查看进程状态,CDC会有3个附属进程,分别是DaemonBootStrap、TaskBootStrap和DumperBootStrap,CDC的系统日志会输出到${HOME}/logs目录下,全局binlog日志会输出到binlog.dir.path参数配置的目录下,TaskBootStrap进程和DumperBootStrap进程被kill后,会被Daemon进程自动拉起。
当 runtime_mode=LOCAL_SINGLE 只会有一个进程DaemonBootStrap 其他两个 TaskBootStrap和DumperBootStrap 都内嵌在DaemonBootStrap里执行

bin/daemon.sh start
  • 1
日志观察

日志文件在 ${HOME}/logs/polardbx-binlog/Daemon下
重点观察 default.log

测试

登录PolarDB-X,执行一些DDL或DML操作,然后执行show binary logs 和show binlog events命令,验证全局binlog的生成状态,

mysql -h127.1 -P8527 -upolardbx_root
show binary logs;
# 这个事件会有很多
show binlog events;
  • 1
  • 2
  • 3
  • 4

在这里插入图片描述

在这里插入图片描述
验证binlog 生成情况 执行DML 语句 以及 DDL 观察binlog日志的 position位点是否更新

show master status
  • 1

在这里插入图片描述

失败重试

CDC的报错 大概率是配置的问题 如果按照如上配置 即可规避90% 以上的错误 如果还有其他的报错,结合日志文件进行具体分析。

参考文档: https://doc.polardbx.com/zh/quickstart/topics/quickstart-development.html

结尾

遇到错误的话 多看日志 结合源码分析错误问题。
在linux环境下 检查文件夹的所属目录权限以及用户组 是否和登录的用户匹配 ,不然可能导致文件读取不到 或者无法写入 。

good day !!!

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/天景科技苑/article/detail/926865
推荐阅读
相关标签
  

闽ICP备14008679号