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

scale in when store id match #124

Merged
merged 5 commits into from
Oct 23, 2018
Merged

Conversation

weekface
Copy link
Contributor

When TiKV scale in/out over and over again, there will be many tombstone stores(different store ids) with the same podName:

    {
      "store": {
        "id": 81,
        "address": "demo-tikv-4.demo-tikv-peer.tidb.svc:20160",
        "state": 2,
        "labels": [
          {
            "key": "host",
            "value": "kube-node-3"
          }
        ],
        "state_name": "Tombstone"
      },
      "status": {
        "capacity": "112 GiB",
        "available": "37 GiB",
        "leader_weight": 1,
        "region_weight": 1,
        "region_score": 364760655.40200007,
        "start_ts": "2018-10-16T09:12:56Z",
        "last_heartbeat_ts": "2018-10-16T09:19:32.341413346Z",
        "uptime": "6m36.341413346s"
      }
    },
    {
      "store": {
        "id": 99,
        "address": "demo-tikv-4.demo-tikv-peer.tidb.svc:20160",
        "state": 2,
        "labels": [
          {
            "key": "host",
            "value": "kube-node-1"
          }
        ],
        "state_name": "Tombstone"
      },
      "status": {
        "capacity": "112 GiB",
        "available": "38 GiB",
        "leader_weight": 1,
        "region_weight": 1,
        "region_score": 317146632.2971641,
        "start_ts": "2018-10-16T09:21:27Z",
        "last_heartbeat_ts": "2018-10-16T09:27:31.180515186Z",
        "uptime": "6m4.180515186s"
      }
    }

So we should scale in only when the store id match also.

@weekface
Copy link
Contributor Author

/run-e2e-tests

@weekface
Copy link
Contributor Author

/run-e2e-tests

Copy link
Member

@tennix tennix 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
Contributor

@xiaojingchen xiaojingchen left a comment

Choose a reason for hiding this comment

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

LGTM

@weekface weekface merged commit d029af6 into pingcap:master Oct 23, 2018
@weekface weekface deleted the fix-scale-in branch October 23, 2018 06:30
queenliuxx pushed a commit to queenliuxx/tidb-operator that referenced this pull request Dec 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants