-
Notifications
You must be signed in to change notification settings - Fork 2k
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
[mysql] Support tables which do not contain a primary key (#1827) #2150
Conversation
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.
Thanks for pushing this issue forward.
NIT: The doc has not updated.
About the question I mentioned before, shall we provide users with the option of exactly-once but worse performance if no pk table?
...ctor-mysql-cdc/src/main/java/com/ververica/cdc/connectors/mysql/source/utils/ChunkUtils.java
Outdated
Show resolved
Hide resolved
...dc/src/main/java/com/ververica/cdc/connectors/mysql/source/assigners/MySqlChunkSplitter.java
Outdated
Show resolved
Hide resolved
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.
Thanks @ruanhang1993 for the contribution, I left some comments.
...-cdc/src/main/java/com/ververica/cdc/connectors/mysql/debezium/reader/BinlogSplitReader.java
Outdated
Show resolved
Hide resolved
...dc/src/main/java/com/ververica/cdc/connectors/mysql/debezium/reader/SnapshotSplitReader.java
Outdated
Show resolved
Hide resolved
...or-mysql-cdc/src/main/java/com/ververica/cdc/connectors/mysql/source/MySqlSourceBuilder.java
Outdated
Show resolved
Hide resolved
...tor-mysql-cdc/src/main/java/com/ververica/cdc/connectors/mysql/source/utils/RecordUtils.java
Outdated
Show resolved
Hide resolved
...src/main/java/com/ververica/cdc/connectors/mysql/source/config/MySqlSourceConfigFactory.java
Outdated
Show resolved
Hide resolved
Co-authored-by: zhuyuan03 <[email protected]>
...ctor-mysql-cdc/src/main/java/com/ververica/cdc/connectors/mysql/source/utils/ChunkUtils.java
Outdated
Show resolved
Hide resolved
...ysql-cdc/src/main/java/com/ververica/cdc/connectors/mysql/table/MySqlTableSourceFactory.java
Outdated
Show resolved
Hide resolved
...-cdc/src/main/java/com/ververica/cdc/connectors/mysql/debezium/reader/BinlogSplitReader.java
Outdated
Show resolved
Hide resolved
...tor-mysql-cdc/src/main/java/com/ververica/cdc/connectors/mysql/source/utils/RecordUtils.java
Outdated
Show resolved
Hide resolved
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.
Thanks @ruanhang1993 for the update, LGTM
if (isDelete) { | ||
if (records == null || records.isEmpty()) { | ||
LOG.error( | ||
"Deleting a record which is not in its split for tables without primary keys. This may happen when the chunk key column is updated in another snapshot split."); |
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.
we need open a doc PR to guide user how to choose chunk key column
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.
I will provide the docs about these experimental features later. See #2164.
Hi, @zstraw . I will provide the docs about these experimental features. |
Co-authored-by: zhuyuan03 <[email protected]>
This PR implements #1827.