bootstrap: use reserved ID for system schemas/tables in nextgen#62570
Conversation
|
Hi @D3Hunter. Thanks for your PR. PRs from untrusted users cannot be marked as trusted with I understand the commands that are listed here. 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 kubernetes-sigs/prow repository. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #62570 +/- ##
================================================
+ Coverage 72.8737% 74.9689% +2.0952%
================================================
Files 1763 1813 +50
Lines 485946 498146 +12200
================================================
+ Hits 354127 373455 +19328
+ Misses 110165 101589 -8576
- Partials 21654 23102 +1448
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
/hold the bootstrap became slower, as we scatter region in serial |
|
/unhold |
[LGTM Timeline notifier]Timeline:
|
lcwangchao
left a comment
There was a problem hiding this comment.
Other part LGTM
But I think this PR makes the boostrap procedure more complex. Do we need to involve more guys to have a review?
| ) | ||
|
|
||
| // BootTableVersion is the version of nextgen bootstrapping. | ||
| type BootTableVersion int |
There was a problem hiding this comment.
Is NextGenBootTableVersion better? It is only used by next-gen now.
|
|
||
| var versionedBootstrapSchemas = []versionedBootstrapSchema{ | ||
| {ver: meta.BaseBootTableVersion, databases: []DatabaseBasicInfo{ | ||
| {ID: metadef.SystemDatabaseID, Name: mysql.SystemDB, Tables: tablesInSystemDatabase[:52]}, |
There was a problem hiding this comment.
Could you add some comments here to explain why use 52 as a slice? I think it's also better to make 52 as a const.
| databases []DatabaseBasicInfo | ||
| } | ||
|
|
||
| var versionedBootstrapSchemas = []versionedBootstrapSchema{ |
There was a problem hiding this comment.
It's better to add more tests here to test the below case:
If in the future a developer add a new table in tablesInSystemDatabase, it should also add a new item in versionedBootstrapSchemas, otherwise, in next-gen bootstrap, the new table will be lost.
There was a problem hiding this comment.
TestMySQLDBTables and TestVersionedBootstrapSchemas are used to check those constraint, to avoid potential human error
|
/retest |
|
@D3Hunter: Cannot trigger testing until a trusted user reviews the PR and leaves an 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 kubernetes-sigs/prow repository. |
|
/retest |
|
@D3Hunter: Cannot trigger testing until a trusted user reviews the PR and leaves an 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 kubernetes-sigs/prow repository. |
|
/unhold |
|
/retest |
|
@D3Hunter: Cannot trigger testing until a trusted user reviews the PR and leaves an 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 kubernetes-sigs/prow repository. |
|
/retest |
|
@D3Hunter: Cannot trigger testing until a trusted user reviews the PR and leaves an 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 kubernetes-sigs/prow repository. |
|
/retest |
|
@D3Hunter: Cannot trigger testing until a trusted user reviews the PR and leaves an 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 kubernetes-sigs/prow repository. |
|
/retest |
|
@D3Hunter: Cannot trigger testing until a trusted user reviews the PR and leaves an 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 kubernetes-sigs/prow repository. |
|
/retest |
|
@D3Hunter: Cannot trigger testing until a trusted user reviews the PR and leaves an 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 kubernetes-sigs/prow repository. |
|
/retest |
|
@D3Hunter: Cannot trigger testing until a trusted user reviews the PR and leaves an 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 kubernetes-sigs/prow repository. |
|
/retest |
|
@D3Hunter: Cannot trigger testing until a trusted user reviews the PR and leaves an 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 kubernetes-sigs/prow repository. |
|
/retest |
|
@D3Hunter: Cannot trigger testing until a trusted user reviews the PR and leaves an 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 kubernetes-sigs/prow repository. |
|
/retest |
|
@D3Hunter: Cannot trigger testing until a trusted user reviews the PR and leaves an 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 kubernetes-sigs/prow repository. |
|
/retest |
|
@D3Hunter: Cannot trigger testing until a trusted user reviews the PR and leaves an 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 kubernetes-sigs/prow repository. |
|
/retest |
|
@D3Hunter: Cannot trigger testing until a trusted user reviews the PR and leaves an 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 kubernetes-sigs/prow repository. |
|
/retest |
|
@D3Hunter: Cannot trigger testing until a trusted user reviews the PR and leaves an 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 kubernetes-sigs/prow repository. |
What problem does this PR solve?
Issue Number: ref #61702
Problem Summary:
What changed and how does it work?
for nextgen, we initialize system dbs/tables in the same way we init DDL related tables, without going through DDL, so we can use reserved ID to create them.
with reserved ID, we can load related Database or schema without scanning all of them, this also can make cross keyspace loading faster
Check List
Tests
after bootstrap with this PR
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.