当前位置:网站首页>Tidb CDC log tables are not eligible to replicate
Tidb CDC log tables are not eligible to replicate
2022-06-11 17:33:00 【On the way to data communication】
One 、 background
I've created a new one cdc Synchronous tasks , Upstream tidb, Downstream is mysql, However, it is found that some newly created tables cannot be synchronized to the downstream mysql in
Two 、 screening
1. Check the log
# The following indicates that this table does not meet the synchronization condition
tables are not eligible to replicate
2.cdc Synchronization limitations
TiCDC Only tables with at least one valid index can be synchronized , The definition of a valid index is as follows :
- Primary key (PRIMARY KEY) Is a valid index .
- A unique index that meets the following conditions (UNIQUE INDEX) Is a valid index :
- Each column in the index is clearly defined as non empty in the table structure (NOT NULL).
- The virtual build column does not exist in the index (VIRTUAL GENERATED COLUMNS).
3、 ... and 、 terms of settlement
Scheme 1 、 Create satisfaction cdc Table of synchronization conditions
Option two 、 change cdc To synchronize a table without a valid index
1. Stop task
tiup ctl:v4.0.15 cdc changefeed pause --pd=http://pd_ip:pd_port --changefeed-id=simple-replication-task
2. modify cdc Task profile
vim cdc.yaml
# Add the following configuration
enable-old-value = true
force-replicate = true
3. Modify the configuration
tiup ctl:v4.0.15 cdc changefeed update --pd=http://pd_ip:pd_port --config=./cdc.yaml --changefeed-id=simple-replication-task
4. start-up cdc Mission
tiup ctl:v4.0.15 cdc changefeed resume --pd=http://pd_ip:pd_port --changefeed-id=simple-replication-task
5. Be careful
enable-old-value v4.0.5 Start supporting
force-replicate v4.0.8 Start supporting
For tables without valid indexes ,INSERT and REPLACE Such operations are not reentrant , Therefore, there is a risk of data redundancy .TiCDC The data is only guaranteed to be distributed at least once during synchronization ,
Therefore, enable this feature to synchronize tables without valid indexes , It will definitely lead to data redundancy . If data redundancy is not acceptable , It is recommended to add effective indexes , For example, adding AUTO RANDOM The primary key column of the attribute .
Official document : Document address
边栏推荐
- LeetCode-384. Scramble array
- Leetcode force deduction question
- 6-6 批量求和(*)
- A simple understanding of closures
- Dynamic: capturing network dynamics using dynamic graph representation learning
- Summary of clustering methods
- Docker installs mysql5.7 (enable binlog function and modify characters)
- 如何成为一个乐观派组织?
- 6-3 读文章(*)
- CLP information -5 keywords to see the development trend of the financial industry in 2022
猜你喜欢

ffmpeg硬件编解码Nvidia GPU

Kubernetes deploys elk and collects container logs using filebeat

Authing biweekly news: authing forum launched (4.25-5.8)

How to become an optimist organization?

使用exe4j 将.jar文件打包为.exe文件

Chapter II relational database

05_特征工程—降维

【深度学习基础】神经网络的学习(3)

CLP information -5 keywords to see the development trend of the financial industry in 2022

Leetcode力扣刷题
随机推荐
String to numeric value
导出数据提示--secure-file-priv选项问题的解决方法
JPA循环保存多个实体失败
mysql 大表的拆分方式
自动化测试-Selenium
require和ES6 import的区别
Error: error summary of pointer as function parameter
The use of histogram function in MATLAB
Authing 背后的计算哲学
ffmpeg硬件编解码Nvidia GPU
Remove key lookup bookmark from SQL Server
Talk about the interview questions of the collection
Mathematical foundations of information security Chapter 3 - finite fields (I)
CLP information -5 keywords to see the development trend of the financial industry in 2022
如何成为一个乐观派组织?
【题解】Codeforces Round #798 (Div. 2)
Is the second-class cost engineer worth the exam? What is the development prospect?
tidb-cdc创建任务报错 Unknown or incorrect time zone
QLineEdit 设置输入掩码
你还不懂线程池的设计及原理吗?掰开揉碎了教你设计线程池