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

infoschema,store: change leader weight/score type to float64 #12151

Merged
merged 6 commits into from
Sep 11, 2019

Conversation

cyliu0
Copy link
Contributor

@cyliu0 cyliu0 commented Sep 11, 2019

What problem does this PR solve?

Leader weight/score types are incompatible with PD, introduced by #10248
Fix #12062

What is changed and how it works?

Change leader weight/score type to float64

Check List

Tests

  • Unit test
  • Manual test (add detailed scripts or steps below)
$ pd-ctl -u http://127.0.0.1:2379 store weight 1 999978974.837482 999978974.837482
Success!

mysql> select * from information_schema.tikv_store_status\G
*************************** 1. row ***************************
         STORE_ID: 1
          ADDRESS: 127.0.0.1:20160
      STORE_STATE: 0
 STORE_STATE_NAME: Up
            LABEL: null
          VERSION: 4.0.0-alpha
         CAPACITY: 234 GiB
        AVAILABLE: 57 GiB
     LEADER_COUNT: 20
    LEADER_WEIGHT: 999978974.837482
     LEADER_SCORE: 0.000000020000420512091697
      LEADER_SIZE: 20
     REGION_COUNT: 20
    REGION_WEIGHT: 999978974.837482
     REGION_SCORE: 0.8436756740337913
      REGION_SIZE: 20
         START_TS: 2019-09-11 11:35:25
LAST_HEARTBEAT_TS: 2019-09-11 11:41:05
           UPTIME: 5m40.804486s
1 row in set (0.01 sec)

Code changes

  • Has exported function/method change

Related changes

  • Need to cherry-pick to the release branch

Release note

  • Fix leader weight/score types are incompatible with PD

@CLAassistant
Copy link

CLAassistant commented Sep 11, 2019

CLA assistant check
All committers have signed the CLA.

@cyliu0 cyliu0 requested a review from winoros September 11, 2019 04:38
@codecov
Copy link

codecov bot commented Sep 11, 2019

Codecov Report

Merging #12151 into master will not change coverage.
The diff coverage is n/a.

@@             Coverage Diff             @@
##             master     #12151   +/-   ##
===========================================
  Coverage   81.3152%   81.3152%           
===========================================
  Files           452        452           
  Lines         96742      96742           
===========================================
  Hits          78666      78666           
  Misses        12440      12440           
  Partials       5636       5636

Copy link
Contributor

@alivxxx alivxxx left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@zz-jason zz-jason left a comment

Choose a reason for hiding this comment

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

LGTM

@zz-jason zz-jason added status/LGT2 Indicates that a PR has LGTM 2. type/bugfix This PR fixes a bug. status/can-merge Indicates a PR has been approved by a committer. labels Sep 11, 2019
@sre-bot
Copy link
Contributor

sre-bot commented Sep 11, 2019

Your auto merge job has been accepted, waiting for 12149

@sre-bot
Copy link
Contributor

sre-bot commented Sep 11, 2019

/run-all-tests

@sre-bot sre-bot merged commit 963f182 into pingcap:master Sep 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2. type/bugfix This PR fixes a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

LeaderScore & LeaderWeight should be float64 which defined in PD
5 participants