Skip to content

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

Merged
merged 6 commits into from
Apr 24, 2025

Conversation

okJiang
Copy link
Member

@okJiang okJiang commented Apr 21, 2025

What problem does this PR solve?

Issue Number: Ref #7703

What is changed and how does it work?

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Release note

None.

okJiang added 3 commits April 21, 2025 16:50
Signed-off-by: okJiang <[email protected]>
Signed-off-by: okJiang <[email protected]>
Signed-off-by: okJiang <[email protected]>
@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. dco-signoff: yes Indicates the PR's author has signed the dco. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Apr 21, 2025
@okJiang
Copy link
Member Author

okJiang commented Apr 21, 2025

/cc @rleungx @lhy1024

@ti-chi-bot ti-chi-bot bot requested review from lhy1024 and rleungx April 21, 2025 09:05
@okJiang
Copy link
Member Author

okJiang commented Apr 21, 2025

/retest

space-update-ratio = 0.0
flow-update-ratio = 0.0
no-update-ratio = 0.0
epoch-update-ratio = 0.9
Copy link
Contributor

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

Copy link
Member

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

@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Apr 21, 2025
Copy link

codecov bot commented Apr 21, 2025

Codecov Report

Attention: Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.

Project coverage is 76.02%. Comparing base (0ae92cd) to head (c10cc93).
Report is 3 commits behind head on master.

❌ 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     
Flag Coverage Δ
unittests 76.02% <0.00%> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@@ -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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reverted 24111bd

}
if failedRequest > 100 {
log.Error("receive error", zap.String("err", "too many errors"))
break
Copy link
Member

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated 24111bd

@@ -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())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why?

Copy link
Member Author

@okJiang okJiang Apr 21, 2025

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.

Copy link
Member

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.

Copy link
Member Author

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]>
@okJiang
Copy link
Member Author

okJiang commented Apr 22, 2025

friendly ping @rleungx

@ti-chi-bot ti-chi-bot bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Apr 24, 2025
Copy link
Contributor

ti-chi-bot bot commented Apr 24, 2025

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Apr 24, 2025
Copy link
Contributor

ti-chi-bot bot commented Apr 24, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-04-21 09:28:51.0054246 +0000 UTC m=+261474.817214976: ☑️ agreed by lhy1024.
  • 2025-04-24 08:57:13.646354725 +0000 UTC m=+518777.458145105: ☑️ agreed by rleungx.

@ti-chi-bot ti-chi-bot bot merged commit f641ae5 into tikv:master Apr 24, 2025
23 of 25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved dco-signoff: yes Indicates the PR's author has signed the dco. lgtm release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants