-
Notifications
You must be signed in to change notification settings - Fork 291
syncer(dm): option for explicit auto-id-cache handling in create table DDLs #12040
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
base: master
Are you sure you want to change the base?
syncer(dm): option for explicit auto-id-cache handling in create table DDLs #12040
Conversation
Hi @michaelmdeng. Thanks for your PR. I'm waiting for a pingcap member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
4aa676d
to
c43a3d9
Compare
/ok-to-test |
01ddbdd
to
b55208d
Compare
@lance6716 sorry about the delay, just managed to fix the relevant integration tests, can you take a look and also check if the release notes and any docs/education look ok? |
Since a new configuration is added in here, could you also add this option to OpenAPI so we can keep it aligned on both ends? |
/retest |
@michaelmdeng Just a quick reminder — one of the two Git email addresses you used for commits in this PR hasn’t signed the CLA yet. Please make sure to sign it so we can proceed with the review. Thanks! |
/hold |
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.
rest lgtm
2f30bab
to
88eb0ff
Compare
@lance6716 Thanks for the review! addressed your feedback and made a couple of naming changes based on discussion in #12039 |
/retest |
1 similar comment
/retest |
[LGTM Timeline notifier]Timeline:
|
@lance6716 can I get help w/ approval for the dm/config changes? |
ptal @D3Hunter @GMHDBJD @OliverS929 |
@OliverS929 thanks for taking a look! wanted to tag you because we were specifically discussing this in the upstream issue |
Hi @michaelmdeng, thanks for tagging me again. I noticed that my earlier comment about default value initialization in the syncer config hasn't received a response yet. I believe it's important to ensure default values are properly set when creating a new sync subtask. Could you take a look and consider making the suggested changes? For reference, please see |
sorry @OliverS929 , not sure I understand the request here. those are configs for the and when/if |
I understand that this is handled by Go’s struct defaulting mechanism. I was just hoping that AutoIDCacheSize (and similar fields) could be explicitly initialized with comments, so it's more obvious to future readers and maintainers. That said, I agree it doesn't affect the functionality of this PR. |
dm/config/task.go
Outdated
@@ -404,6 +404,8 @@ type SyncerConfig struct { | |||
Compact bool `yaml:"compact" toml:"compact" json:"compact"` | |||
MultipleRows bool `yaml:"multiple-rows" toml:"multiple-rows" json:"multiple-rows"` | |||
|
|||
AutoIDCacheSize uint64 `yaml:"auto-id-cache-size" toml:"auto-id-cache-size" json:"auto-id-cache-size"` |
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.
It seems that the new config "auto-id-cache-size" does not have a default value attached to it when it is not included in the config. I think it would be great if we could have a explicit default value here that aligns with behavior from previous versions, for clarity purpose.
rest LGTM |
@OliverS929: adding LGTM is restricted to approvers and reviewers in OWNERS files. In response to this: Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: lance6716, OliverS929 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/cc @alastori. Because this PR involves modification to DM config, I think it would need approval from you and Ben. |
@OliverS929, thanks for asking. The longer key name @michaelmdeng Tiny nit: the sample YAML in the PR description still shows the old Thanks! |
What problem does this PR solve?
Issue Number: close #12039
What is changed and how it works?
Adds a new
create-table-auto-id-cache-size
Syncer config.create-table
refers to the fact that this config affectsCREATE TABLE
statements, and when set, DM incremental replication of new tables will update thecreate table
statement w/ the corresponding auto-id-cache size. When unset (0 or default), the statement will be left as is.I believe this change should not affect other DM components, including import for "full" or "all" mode, but would appreciate guidance here as well.
Check List
Tests
Questions
Will it cause performance regression or break compatibility?
No
Do you need to update user documentation, design documentation or monitoring documentation?
Yes, needs documentation on the new config setting and its purpose/usage.
Release note