-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Oracle][MySQL][SqlServer][PostgresSQL] Fix Oracle/MySQL/SqlServer/PostgresSQL CDC parser schema change event failed #2315
Conversation
@ruanhang1993 pls review it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@e-mhui Thanks for the work.
Maybe Oracle cdc should provide a new dispatcher by self instead of modifying the dispatcher in connector-base. WDYT?
Maybe we could change some scope of methods for JdbcSourceEventDispatcher to reuse its code.
flink-cdc-base/src/main/java/com/ververica/cdc/connectors/base/utils/SourceRecordUtils.java
Outdated
Show resolved
Hide resolved
@ruanhang1993 Hi, I have refactored the code, please review it again.
|
@e-mhui please run mvn spotless:apply fix code style,thanks |
Thanks, it has done. |
262f827
to
51170a0
Compare
@e-mhui please refer https://github.com/ververica/flink-cdc-connectors/blob/master/README.md#code-style fix your code style to pass ci check |
67ff61b
to
d8a4984
Compare
@gtk96 I had been fixed the check style, can you rerun the workflow ? |
@ruanhang1993 pls review it. |
a58156d
to
f442ccc
Compare
@ruanhang1993 Could you please help to review this pr? Many thanks. |
f442ccc
to
db96c9c
Compare
@e-mhui Hi. We need to add some tests to test this bug. |
@ruanhang1993 Hi, pls review again. |
thanks @e-mhui for contributing and @ruanhang1993 for merging this! |
I did't find handler packages in the /com/ververica/cdc/connectors/base/relational and the flink-connector-oracle-cdc also not found, how to deal with the schema changes myself using the release-3.0? thanks a lot.@e-mhui |
@stardustman @Jetol The latest release 3.0.1 was packaged on Jan 22 and has not fixed this issue. If you want to use it in advance, you can build it yourself from the master branch. Otherwise, you will have to wait for the next release version. package command:
|
hello, I'm a new user of the |
@stardustmanYes, it will work automatically. However, you may need to configure some parameters to capture DDL events. debezium.database.history.store.only.captured.tables.ddl = true You can also refer to: |
I read the doc docs/connectors/cdc-connectors/oracle-cdc/#connector-options. is it the config belongs to public static void main(String[] args) throws Exception {
Properties debeziumProperties = new Properties();
debeziumProperties.setProperty("log.mining.strategy", "online_catalog"); will the "log.mining.strategy" need to start with "debezium"? thanks a lot for bothering you many times😄. @e-mhui |
It is a parameter of debezium, so you should add the prefix |
fix error the "log.mining.strategy" should be start with prefix "debezium." according to https://nightlies.apache.org/flink/flink-cdc-docs-release-3.0/zh/docs/connectors/cdc-connectors/oracle-cdc/#connector-options and the help from @e-mhui with the link apache#2315 (comment)
合并到哪个版本了呢 |
3.1 |
Fix: #2055 #1792 #1379 #1807 #1810 #1803 #1804 #2311
When a SchemaChangeEvent is triggered, the
schemaChangeRecordValue
will obtain binlog information from sourceInfo. However, only MySQL CDC has binlog information, and other CDC will report an error after triggering a SchemaChangeEvent event.So I provided an interface for each connector to implement their own sourceinfo parsing.
Then, it's used in JdbcSourceEventDispatcher#schemaChangeRecordValue.
For MySQL CDC
For Oracle CDC