-
Notifications
You must be signed in to change notification settings - Fork 732
bench/heartbeat: make heartbeat bench better #9224
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
Conversation
Signed-off-by: okJiang <[email protected]>
Signed-off-by: okJiang <[email protected]>
Signed-off-by: okJiang <[email protected]>
/retest |
space-update-ratio = 0.0 | ||
flow-update-ratio = 0.0 | ||
no-update-ratio = 0.0 | ||
epoch-update-ratio = 0.9 |
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.
If this pr is merged, #8569 could be closed
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.
0.9 is impractical value for heartbeat bench
Codecov ReportAttention: Patch coverage is
❌ Your patch status has failed because the patch coverage (0.00%) is below the target coverage (74.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## master #9224 +/- ##
==========================================
- Coverage 76.05% 76.02% -0.04%
==========================================
Files 470 470
Lines 73028 73034 +6
==========================================
- Hits 55543 55522 -21
- Misses 14039 14067 +28
+ Partials 3446 3445 -1
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
tools/pd-heartbeat-bench/main.go
Outdated
@@ -162,7 +162,7 @@ func putStores(ctx context.Context, cfg *config.Config, cli pdpb.PDClient, store | |||
log.Fatal("failed to put store", zap.Uint64("store-id", i), zap.String("err", resp.GetHeader().GetError().String())) | |||
} | |||
go func(ctx context.Context, storeID uint64) { | |||
heartbeatTicker := time.NewTicker(10 * time.Second) | |||
heartbeatTicker := time.NewTicker(3 * time.Second) |
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.
why?
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.
reverted 24111bd
tools/pd-heartbeat-bench/main.go
Outdated
} | ||
if failedRequest > 100 { | ||
log.Error("receive error", zap.String("err", "too many errors")) | ||
break |
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.
I think no need to break.
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.
updated 24111bd
tools/utils/meta.go
Outdated
@@ -203,7 +203,7 @@ func (rs *Regions) Update(regionCount, replicaCount int, options *config.Options | |||
reportRegions := pick(indexes, regionCount, options.GetReportRatio()) | |||
|
|||
reportCount := len(reportRegions) | |||
rs.updateFlow = pick(reportRegions, reportCount, options.GetFlowUpdateRatio()) | |||
rs.updateFlow = randomPick(reportRegions, reportCount, options.GetFlowUpdateRatio()) |
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.
why?
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.
Randompick is better than pick. Pick only selects the first X percent.
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.
I think the reason why we use pick is that we want the flow to be stable.
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.
Is using the ratio to control the flow sufficient?🤔
Signed-off-by: okJiang <[email protected]>
friendly ping @rleungx |
Signed-off-by: okJiang <[email protected]>
Signed-off-by: okJiang <[email protected]>
[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
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What problem does this PR solve?
Issue Number: Ref #7703
What is changed and how does it work?
Check List
Tests
Release note