Skip to content
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

*: reduce rand NewSource #8675

Merged
merged 2 commits into from
Sep 29, 2024
Merged

*: reduce rand NewSource #8675

merged 2 commits into from
Sep 29, 2024

Conversation

rleungx
Copy link
Member

@rleungx rleungx commented Sep 29, 2024

What problem does this PR solve?

Issue Number: Close #8674.

What is changed and how does it work?

Initialize rand when creating schedulers and checkers instead of initializing it every time scheduling.

Check List

Tests

  • Unit test

Release note

None.

@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-triage-completed 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/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Sep 29, 2024
Signed-off-by: Ryan Leung <[email protected]>
Copy link

codecov bot commented Sep 29, 2024

Codecov Report

Attention: Patch coverage is 94.80519% with 4 lines in your changes missing coverage. Please review.

Project coverage is 77.57%. Comparing base (f8a0d80) to head (f5f97b0).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8675      +/-   ##
==========================================
- Coverage   77.62%   77.57%   -0.05%     
==========================================
  Files         474      474              
  Lines       62355    62359       +4     
==========================================
- Hits        48401    48374      -27     
- Misses      10395    10427      +32     
+ Partials     3559     3558       -1     
Flag Coverage Δ
unittests 77.57% <94.80%> (-0.05%) ⬇️

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

@@ -67,40 +71,40 @@ func (*ReplicaChecker) GetType() types.CheckerSchedulerType {
}

// Check verifies a region's replicas, creating an operator.Operator if need.
func (r *ReplicaChecker) Check(region *core.RegionInfo) *operator.Operator {
func (c *ReplicaChecker) Check(region *core.RegionInfo) *operator.Operator {
Copy link
Contributor

Choose a reason for hiding this comment

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

Does it seem to contain the change from another pr?

Copy link
Member Author

@rleungx rleungx Sep 29, 2024

Choose a reason for hiding this comment

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

No, this change is needed since we use r as the field's naming.

@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Sep 29, 2024
@ti-chi-bot ti-chi-bot bot added the lgtm label Sep 29, 2024
Copy link
Contributor

ti-chi-bot bot commented Sep 29, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lhy1024, okJiang

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 removed the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Sep 29, 2024
Copy link
Contributor

ti-chi-bot bot commented Sep 29, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-09-29 07:52:00.42746514 +0000 UTC m=+168475.847678144: ☑️ agreed by lhy1024.
  • 2024-09-29 08:49:37.980618729 +0000 UTC m=+171933.400831742: ☑️ agreed by okJiang.

Copy link
Contributor

ti-chi-bot bot commented Sep 29, 2024

@rleungx: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-integration-realcluster-test f5f97b0 link false /test pull-integration-realcluster-test

Full PR test history. Your PR dashboard.

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/test-infra repository. I understand the commands that are listed here.

@ti-chi-bot ti-chi-bot bot merged commit 25dedab into tikv:master Sep 29, 2024
24 of 25 checks passed
@rleungx rleungx deleted the reduce-rand-source branch September 29, 2024 09:44
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.

pd CPU jitter every 5s
3 participants