-
Notifications
You must be signed in to change notification settings - Fork 725
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
pd-simulator: update import-data case #2741
Conversation
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 it be helpful to the previous issue?
@@ -40,8 +40,8 @@ func newImportData() *Case { | |||
}) | |||
} | |||
|
|||
storeIDs := rand.Perm(3) | |||
for i := 0; i < 40; i++ { | |||
for i := 0; i < 10000; i++ { |
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.
can it be configured?
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.
Changed to configurable.
Which one... |
PTAL @nolouch |
|
checkCount++ | ||
dev := 0.0 | ||
for _, p := range regionProps { | ||
dev += (p - 10) * (p - 10) / 100 |
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 it still be 10 after region num is configured?
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.
It means if balanced, store each get 10 % of data, no matter what the total is.
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.
OK
In fact, after changing to the new scenario, because import data(3 out of 10 peers) makes it less balanced, we don't need to set a stop time, but we should observe the deviation. If schedulers work properly, balance should not be greatly affected by the import. |
This behavior seems to be different compared to other simulators |
Yes. It is because the new scenario is an unbalanced import. Indeed, it is trivial to add a stop condition. |
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. we also need to manual test.
It will stop at tick 1009 if region number is 10000. |
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.
/merge |
/merge |
/run-all-tests |
* Fix mv peer log parse error * Delete unused var * Rename * Update case * Address comment * Update import_data.go * Add stop condition Co-authored-by: ShuNing <nolouch@gmail.com>
* Fix mv peer log parse error * Delete unused var * Rename * Update case * Address comment * Update import_data.go * Add stop condition Co-authored-by: ShuNing <nolouch@gmail.com> Signed-off-by: ZenoTan <zenotan1998@gmail.com>
What problem does this PR solve?
Import data case is a case in pd simulator. Originally, it has 40 regions, and it imports many regions afterwards. Then import regions >> previous regions. The real scenario is, import regions << previous regions. So now it imports regions 10% of previous size.
What is changed and how it works?
Changed import data case.
Check List
Tests
Release note