*: support auto_random table option#16750
Conversation
e5f79a0 to
20a1666
Compare
Codecov Report
@@ Coverage Diff @@
## master #16750 +/- ##
===========================================
Coverage 80.5344% 80.5344%
===========================================
Files 507 507
Lines 138491 138491
===========================================
Hits 111533 111533
Misses 18299 18299
Partials 8659 8659 |
infoschema/builder.go
Outdated
| var allocs autoid.Allocators | ||
| if tableIDIsValid(oldTableID) { | ||
| if oldTableID == newTableID && diff.Type != model.ActionRenameTable && diff.Type != model.ActionRebaseAutoID && diff.Type != model.ActionModifyTableAutoIdCache { | ||
| if oldTableID == newTableID && diff.Type != model.ActionRenameTable && diff.Type != model.ActionRebaseAutoID && diff.Type != model.ActionRebaseAutoRandomBase && diff.Type != model.ActionModifyTableAutoIdCache { |
There was a problem hiding this comment.
It seems that if we only rebase auto_random, but auto_id also rebase(we will clean the cache in TiDB).
There was a problem hiding this comment.
seems right. should keep the special allocator survive?
There was a problem hiding this comment.
Could we handle it?I think it feels confusing to users. And please add some tests.
|
/run-integration-copr-test |
|
/run-integration-common-test |
1 similar comment
|
/run-integration-common-test |
|
/run-integration-common-test |
|
/run-all-tests |
|
@AilinKid merge failed. |
|
/run-integration-common-test |
|
integration-common-test seems nothing to do with this PR, so we gonna merge it now |
|
cherry pick to release-3.1 in PR #16812 |
|
cherry pick to release-4.0 in PR #16813 |
Signed-off-by: sre-bot <sre-bot@pingcap.com>
What problem does this PR solve?
Problem Summary: support
auto_random_basetable option, this PR is related to issue pingcap/br#241What is changed and how it works?
How it Works:
After this table option:
We can do the auto_random rebase by
alter table xxx auto_random_base = numAlso we can specify the initial auto_random base by
create table t xxx(xxx) auto_random_base = numRelated changes
pingcap/docs/pingcap/docs-cn:Check List
Tests
Release note
support auto_random table option for rebase auto_random allocator