-
Notifications
You must be signed in to change notification settings - Fork 102
When br is restoring cdclog, if there is a ddl operation in the TS interval, the ddl operation will not be restored #870
Comments
The reason we choose |
So it looks like the DDL file is filtered out while part of the file should have been applied. This looks like it may be the same issue as reported here. |
Lines 153 to 159 in e3ca195
When filtering a DDL file, here treat the suffix of the file name as the commit ts of the last DDL in this file, but in fact, the file name corresponds to the commit ts of the first DDL. https://github.com/pingcap/ticdc/blob/e4e96ed4204abc30f1e983e477cdf74d267948af/cdc/sink/cdclog/file.go#L267-L274 https://github.com/pingcap/ticdc/blob/e4e96ed4204abc30f1e983e477cdf74d267948af/cdc/sink/cdclog/s3.go#L307-L311 |
Line 154 in e3ca195
This operate is done by cdclog, but ddl files do not rename to the last commit ts. @3pointer |
yes, you are right, I give a workaround PR to fix it. And I think we'd better unified it in the future before we release this feature. |
can we close it? |
Please answer these questions before submitting your issue. Thanks!
What did you do?
If possible, provide a recipe for reproducing the error.
When cdc outputs the ddl operation, name the suffix of the ddl file name as uint64max-TS of the first ddl operation (it can be directly named as the TS of the last ddl), and then when collecting ddl files during br recovery, add this ts is regarded as the TS of the last ddl, and all ddl smaller than startTs are filtered out, so some ddl files that should not be filtered are filtered out, so some ddl operations are not restored when they are restored.
What did you expect to see?
What did you see instead?
What version of BR and TiDB/TiKV/PD are you using?
Operation logs
br.log
for BR if possibletidb-lightning.log
for TiDB-Lightning if possibletikv-importer.log
from TiKV-Importer if possibleConfiguration of the cluster and the task
tidb-lightning.toml
for TiDB-Lightning if possibletikv-importer.toml
for TiKV-Importer if possibletopology.yml
if deployed by TiUPScreenshot/exported-PDF of Grafana dashboard or metrics' graph in Prometheus if possible
The text was updated successfully, but these errors were encountered: