dm: add LOCK TABLES privilege note for managed MySQL sources#22605
dm: add LOCK TABLES privilege note for managed MySQL sources#22605alastori wants to merge 3 commits intopingcap:masterfrom
Conversation
When migrating from managed MySQL services (RDS, Aurora) where FTWRL is restricted, DM's consistency=auto mode falls back to LOCK TABLES. Added conditional privilege documentation to dm-worker-intro, dm-precheck, and quick-start-with-dm. Confirmed with Minghao Guo: FTWRL→LOCK TABLES fallback is by design, Cloud DM defaults to consistency=auto. Lab evidence: https://github.com/alastori/tidb-sandbox/tree/main/labs/dm/lab-06-lock-tables-privilege Related: pingcap#22598 (Cloud DM docs) Related: https://tidb.atlassian.net/browse/DM-12687 (pre-check improvement)
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
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 enhances the documentation for TiDB Data Migration (DM) to provide clearer guidance on 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. 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. Footnotes
|
There was a problem hiding this comment.
Code Review
The pull request enhances the documentation for TiDB Data Migration (DM) by providing clearer guidance on the "LOCK TABLES" privilege, especially for managed MySQL services like Amazon RDS and Aurora. This addresses a specific scenario where DM's consistency=auto mode falls back to LOCK TABLES when FLUSH TABLES WITH READ LOCK is restricted. The changes improve the completeness and accuracy of the privilege requirements across several key documentation pages, making the information more precise and helpful for users.
- dm-precheck.md: separate what precheck checks (consistency=lock) from what's needed at runtime (auto fallback), with explicit Note that precheck does not currently validate this - Expand all provider lists to include Azure and Google Cloud SQL - Use "not permitted" consistently instead of "restricted" - Fix commented-out GRANT: use separate code block instead - Also fixes pre-existing error: old text said LOCK TABLES needed for consistency=flush, but flush uses FTWRL (RELOAD), not LOCK TABLES
What is changed, added or deleted?
Added conditional
LOCK TABLESprivilege documentation for managed MySQL sources (Amazon RDS, Aurora, Google Cloud SQL) across three DM docs pages.Background: DM defaults to
consistency=auto. On managed MySQL whereFLUSH TABLES WITH READ LOCKis restricted by the cloud provider, DM falls back toLOCK TABLES. This privilege is not needed on self-managed MySQL instances. Confirmed with @GMHDBJD (Minghao Guo): the FTWRL → LOCK TABLES fallback inautomode is by design.Changes:
dm/dm-precheck.md: Clarified thatLOCK TABLESis needed forautofallback on managed MySQL, not justflush/lockdm/dm-worker-intro.md: AddedLOCK TABLESto privilege table with managed-MySQL scope note; added conditional GRANT exampledm/quick-start-with-dm.md: Added note pointing to dm-worker-intro for managed MySQL sources (×2 instances)Evidence: Lab-06: LOCK TABLES privilege testing (9 scenarios, vanilla MySQL vs RDS)
Related:
Which TiDB version(s) do your changes apply to?
cc @GMHDBJD @qiancai @OliverS929