dm: fix validator handling for unsigned columns#12554
dm: fix validator handling for unsigned columns#12554ti-chi-bot[bot] merged 2 commits intopingcap:masterfrom
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request resolves a critical data validation issue within the DM validator where Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request addresses an issue with the DM validator's handling of unsigned columns, which was causing false-positive errors. The fix involves normalizing row images using adjustValueFromBinlogData before validation, which aligns the validator's behavior with the syncer's. A regression test for an int unsigned primary key has been added to verify the fix.
The changes are logical and the new test case effectively validates the correction. I have one minor suggestion regarding a helper function to improve code clarity. Overall, this is a solid contribution.
There was a problem hiding this comment.
Code Review
This pull request correctly addresses an issue with UNSIGNED column handling in the DM validator by normalizing row values before validation, aligning it with the syncer's behavior. The addition of a regression test for an int unsigned primary key is a valuable addition. I have one suggestion to simplify the implementation by inlining a new helper function, which would slightly improve code clarity.
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: GMHDBJD, kennytm The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/cherry-pick release-8.5 |
|
@OliverS929: new pull request created to branch DetailsIn 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 ti-community-infra/tichi repository. |
|
In response to a cherrypick label: new pull request created to branch |
What problem does this PR solve?
Issue Number: close #12178
What is changed and how it works?
DM validator now normalizes row images with
adjustValueFromBinlogDatabefore buildingRowChange, soUNSIGNEDvalues follow the same conversion path as syncer.This prevents high-bit
UNSIGNEDvalues from being treated as negative signed integers during row key generation and downstream validation.A regression test is added for an
int unsignedprimary key case.Check List
Tests
Questions
Will it cause performance regression or break compatibility?
No. This only reuses the existing binlog value normalization path in validator.
Do you need to update user documentation, design documentation or monitoring documentation?
No.
Release note