consumer: ignore stale event after renaming table in storage consumer#4871
consumer: ignore stale event after renaming table in storage consumer#4871ti-chi-bot[bot] merged 3 commits intopingcap:masterfrom
Conversation
|
Skipping CI for Draft Pull Request. |
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 48 minutes and 48 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Code Review
This pull request enhances the storage consumer to correctly handle table rename operations by updating DDL watermarks for both the old and new table identities. It introduces helper functions to parse DDL statements using the TiDB parser. Review feedback highlights the need to remove an unused regular expression and its corresponding import, and suggests adding safety checks to the type assertions and slice accesses during DDL parsing to avoid potential panics.
| "context" | ||
| "encoding/json" | ||
| "fmt" | ||
| "regexp" |
| fakePartitionNumForSchemaFile = -1 | ||
| ) | ||
|
|
||
| var renameTableQueryRe = regexp.MustCompile(`(?is)^rename\s+table\s+(.+?)\s+to\s+(.+?)$`) |
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
[LGTM Timeline notifier]Timeline:
|
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: 3AceShowHand, flowbehappy, wlwilliamx 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 |
|
/retest |
What problem does this PR solve?
Issue Number: close #4334
What is changed and how it works?
Decode rename ddl query and update the old table name in tableDDLWatermark
Check List
Tests
Questions
Will it cause performance regression or break compatibility?
Do you need to update user documentation, design documentation or monitoring documentation?
Release note