Skip to content
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

Merged
merged 4 commits into from
May 30, 2023

Conversation

ruanhang1993
Copy link
Contributor

This PR implements #1827.

Copy link

@zstraw zstraw left a 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?

Copy link
Contributor

@leonardBang leonardBang left a 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.

Co-authored-by: zhuyuan03 <zhuyuan03@corp.netease.com>
Copy link
Contributor

@leonardBang leonardBang left a 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.");
Copy link
Contributor

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

Copy link
Contributor Author

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.

@ruanhang1993 ruanhang1993 merged commit 0f8023d into apache:master May 30, 2023
14 checks passed
@ruanhang1993
Copy link
Contributor Author

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?

Hi, @zstraw .
The single split is actually hard to use for users. All table data will be read into the memory and may cause OOM.
So this implementation requires the chunk key column when the table does not have primary keys.

I will provide the docs about these experimental features.

@ruanhang1993 ruanhang1993 deleted the nopk branch October 23, 2023 06:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants