codec, checker: fix enable-cross-table-merge for keyspace keys (#10992)#10995
Conversation
close tikv#10991 Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
|
@JmPotato This PR has conflicts, I have hold it. |
|
@ti-chi-bot: ## If you want to know how to resolve it, please read the guide in TiDB Dev Guide. DetailsInstructions 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. |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ 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 |
Signed-off-by: JmPotato <github@ipotato.me>
|
Cherry-pick conflicts appear resolved; removing the |
|
/hold cancel |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## release-nextgen-202603 #10995 +/- ##
==========================================================
+ Coverage 79.07% 79.09% +0.02%
==========================================================
Files 531 531
Lines 72298 72323 +25
==========================================================
+ Hits 57168 57206 +38
+ Misses 11093 11080 -13
Partials 4037 4037
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: lhy1024, rleungx 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 |
|
/hold |
Signed-off-by: JmPotato <github@ipotato.me>
|
Cherry-pick conflicts appear resolved; removing the |
|
/test pull-unit-test-next-gen-3 |
1 similar comment
|
/test pull-unit-test-next-gen-3 |
5daaa83
into
tikv:release-nextgen-202603
This is an automated cherry-pick of #10992
What problem does this PR solve?
Issue Number: Close #10991
On NextGen / keyspace clusters (e.g. TiDB Cloud Premium),
enable-cross-table-merge=falsedid not prevent cross-table region merges.codec.Key.TableID()only recognized classic TiDB keys starting with't', so keyspace-prefixed keys (x|r+ keyspace id + table key) always returned table ID0. Merge checker then treated every pair of regions as the same table and merged empty tables together aftersplit-merge-interval.What is changed and how does it work?
Check List
Tests
tests/server/cluster/TestCrossTableMergeWithKeyspace: real pd-server, keyspace-encoded regions; also fails on unfixed master, reproducing the bug)api-version=2+ TiDB v8.5.6keyspace-name; 20 empty tables kept their own regions for 150s withenable-cross-table-merge=false, then merged 83→4 regions within 90s after flipping it totrue)Related changes
Release note
Summary by CodeRabbit
New Features
Bug Fixes
Tests