当前位置:网站首页>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
边栏推荐
猜你喜欢

ADB command learning notes

Leetcode force deduction question

为什么udp流设置1316字节

vscode配置eslint自动格式化报错“The setting is deprecated. Use editor.codeActionsOnSave instead with a source“

如何成为一个乐观派组织?

C language: use H and C. summary of problems encountered in documents

Authoring share | understanding saml2 protocol

Hands on deep learning - multiple input and output channels in the convolution layer

Xie Yang, CEO of authing, was selected into Forbes' 30 under 30 Asia list in 2021

Authing Share|理解 SAML2 协议
随机推荐
Mathematical basis of information security Chapter 2 - congruence
Leetcode force deduction question
Vscode configures eslint to automatically format with an error "the setting is deprecated. use editor.codeactionsonsave instead with a source“
How does Sister Feng change to ice?
如何成为一个乐观派组织?
Service学习笔记01-启动方式与生命周期
【线上问题】Timeout waiting for connection from pool 问题排查
6-3 批量求和(*)
7-2 h0107. Pig-Latin
Windows technology - how to view the instruction set, model, attribute and other details supported by the CPU, and how to use the CPU-Z tool to view the processor, memory, graphics card, motherboard,
Mathematical foundations of information security Chapter 3 - finite fields (II)
How to simplify a lot of if... Elif... Else code?
端口规划与APJ
论文阅读 dyngraph2vec: Capturing Network Dynamics using Dynamic Graph Representation Learning
合并两个有序链表---2022/02/24
Connect the server with springboard / fortress through xshell
Chapter II relational database
Qlineedit set input mask
【深度学习基础】神经网络的学习(3)
05_ Feature Engineering - dimension reduction