-
Notifications
You must be signed in to change notification settings - Fork 289
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
simulator(dm): implement some core components #4838
Conversation
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
/run-verify |
Codecov Report
Flags with carried forward coverage won't be shown. Click here to find out more. @@ Coverage Diff @@
## master #4838 +/- ##
================================================
- Coverage 56.1240% 56.0903% -0.0337%
================================================
Files 522 523 +1
Lines 65325 68436 +3111
================================================
+ Hits 36663 38386 +1723
- Misses 25094 26287 +1193
- Partials 3568 3763 +195 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will review later
} | ||
} | ||
|
||
func (s *testMCPSuite) TestMCPAddDeleteInParallel() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since operations on MCP is serialized(always locked), i think this test is not needed, but it's ok to keep it.
} | ||
|
||
// NextUK randomly picks a unique key in the MCP. | ||
func (mcp *ModificationCandidatePool) NextUK() *UniqueKey { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we may need to allocate some uks in batch if the performance is not satisfied
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Considering that we have introduced tikv/pd
dep, maybe we can reuse pd.GenerateTSO
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about add a sqlgen demo?
* Refined MCP and SQLGen implementations according to the PR comments * Also refined tests
* Added an extra UK
/run-verify |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will review sqlgen soon
} | ||
|
||
// NextUK randomly picks a unique key in the MCP. | ||
func (mcp *ModificationCandidatePool) NextUK() *UniqueKey { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Considering that we have introduced tikv/pd
dep, maybe we can reuse pd.GenerateTSO
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rest lgtm
ping @dsdashun |
What should we do about this PR @dsdashun |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
) | ||
|
||
// SQLGenerator contains all the operations for generating SQLs. | ||
type SQLGenerator interface { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need a GenCreateTableSQL
func to make sqlgen more friendly
maybe do this later
/merge |
@dsdashun: In 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 ti-community-infra/tichi repository. |
/hold I think we can merge it after the v6.1 LTS release |
seems doesn't matter, this module is quite standalone |
/unhold |
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 08b991d
|
@dsdashun: Your PR was out of date, I have automatically updated it for you. At the same time I will also trigger all tests for you: /run-all-tests If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes. 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 ti-community-infra/tichi repository. |
What problem does this PR solve?
Issue Number: ref #4835
What is changed and how it works?
Implemented some core components of the simulator:
Check List
Tests
Code changes
Side effects
Related changes
N/A
Release note