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

pdutil(ticdc): split tidb_ddl_job table (#6673) #6700

Conversation

ti-chi-bot
Copy link
Member

This is an automated cherry-pick of #6673

What problem does this PR solve?

Issue Number: close #4756

What is changed and how it works?

Split the table tidb_ddl_job.

Check List

Tests

  • Unit test
  • Manual test

Logs from PD leader.

[2022/08/09 08:33:44.514 +00:00] [INFO] [operator_controller.go:450] ["add operator"] [region-id=8978001] [operator="\"labeler-split-region {split: region 8978001 use policy USEKEY and keys [748000FFFFFFFFFFFFFE00000000000000F8 748000FFFFFFFFFFFFFF00000000000000F8]} (kind:split, region:8978001(4850, 5), createAt:2022-08-09 08:33:44.512985722 +0000 UTC m=+1131983.134539904, startAt:0001-01-01 00:00:00 +0000 UTC, currentStep:0, size:2, steps:[split region with policy USEKEY])\""] [additional-info="{\"region-end-key\":\"\",\"region-start-key\":\"7480000000000003FF5F5F728000000000FF436EF30000000000FA\"}"]
[2022/08/09 08:33:44.516 +00:00] [INFO] [operator_controller.go:652] ["send schedule command"] [region-id=8978001] [step="split region with policy USEKEY"] [source=create]
[2022/08/09 08:33:44.519 +00:00] [INFO] [cluster_worker.go:139] ["alloc ids for region split"] [region-id=10365001] [peer-ids="[10365002,10365003,10365004]"]
[2022/08/09 08:33:44.519 +00:00] [INFO] [cluster_worker.go:139] ["alloc ids for region split"] [region-id=10365005] [peer-ids="[10365006,10365007,10365008]"]
[2022/08/09 08:33:44.524 +00:00] [INFO] [region.go:580] ["region Version changed"] [region-id=8978001] [detail="StartKey Changed:{7480000000000003FF5F5F728000000000FF436EF30000000000FA} -> {748000FFFFFFFFFFFFFF00000000000000F8}, EndKey:{}"] [old-version=4850] [new-version=4852]
[2022/08/09 08:33:44.527 +00:00] [INFO] [operator_controller.go:566] ["operator finish"] [region-id=8978001] [takes=11.372527ms] [operator="\"labeler-split-region {split: region 8978001 use policy USEKEY and keys [748000FFFFFFFFFFFFFE00000000000000F8 748000FFFFFFFFFFFFFF00000000000000F8]} (kind:split, region:8978001(4850, 5), createAt:2022-08-09 08:33:44.512985722 +0000 UTC m=+1131983.134539904, startAt:2022-08-09 08:33:44.516296175 +0000 UTC m=+1131983.137850403, currentStep:1, size:2, steps:[split region with policy USEKEY]) finished\""] [additional-info="{\"region-end-key\":\"\",\"region-start-key\":\"7480000000000003FF5F5F728000000000FF436EF30000000000FA\"}"]
[2022/08/09 08:33:44.526 +00:00] [INFO] [cluster_worker.go:231] ["region batch split, generate new regions"] [region-id=8978001] [origin="id:10365001 start_key:\"7480000000000003FF5F5F728000000000FF436EF30000000000FA\" end_key:\"748000FFFFFFFFFFFFFE00000000000000F8\" region_epoch:<conf_ver:5 version:4852 > peers:<id:10365002 store_id:1 > peers:<id:10365003 store_id:4 > peers:<id:10365004 store_id:5 > id:10365005 start_key:\"748000FFFFFFFFFFFFFE00000000000000F8\" end_key:\"748000FFFFFFFFFFFFFF00000000000000F8\" region_epoch:<conf_ver:5 version:4852 > peers:<id:10365006 store_id:1 > peers:<id:10365007 store_id:4 > peers:<id:10365008 store_id:5 >"] [total=2]
$ pd-ctl region 10365001
{
  "id": 10365001,
  "start_key": "7480000000000003FF5F5F728000000000FF436EF30000000000FA",
  "end_key": "748000FFFFFFFFFFFFFE00000000000000F8",
  "epoch": {
    "conf_ver": 5,
    "version": 4852
  },
  "peers": [
    {
      "id": 10365002,
      "store_id": 1,
      "role_name": "Voter"
    },
    {
      "id": 10365003,
      "store_id": 4,
      "role_name": "Voter"
    },
    {
      "id": 10365004,
      "store_id": 5,
      "role_name": "Voter"
    }
  ],
  "leader": {
    "id": 10365002,
    "store_id": 1,
    "role_name": "Voter"
  },
  "written_bytes": 0,
  "read_bytes": 0,
  "written_keys": 0,
  "read_keys": 0,
  "approximate_size": 2,
  "approximate_keys": 10813
}

$ pd-ctl region 8978001
{
  "id": 8978001,
  "start_key": "748000FFFFFFFFFFFFFF00000000000000F8",
  "end_key": "",
  "epoch": {
    "conf_ver": 5,
    "version": 4852
  },
  "peers": [
    {
      "id": 8978002,
      "store_id": 1,
      "role_name": "Voter"
    },
    {
      "id": 8978003,
      "store_id": 4,
      "role_name": "Voter"
    },
    {
      "id": 8978004,
      "store_id": 5,
      "role_name": "Voter"
    }
  ],
  "leader": {
    "id": 8978002,
    "store_id": 1,
    "role_name": "Voter"
  },
  "written_bytes": 362,
  "read_bytes": 0,
  "written_keys": 6,
  "read_keys": 0,
  "approximate_size": 1,
  "approximate_keys": 0
}

Questions

Will it cause performance regression or break compatibility?

No.

Do you need to update user documentation, design documentation or monitoring documentation?

No.

Release note

None

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@ti-chi-bot
Copy link
Member Author

[REVIEW NOTIFICATION]

This pull request has not been approved.

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot added area/ticdc Issues or PRs related to TiCDC. 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. do-not-merge/cherry-pick-not-approved status/LGT2 Indicates that a PR has LGTM 2. type/cherry-pick-for-release-5.4 This PR is cherry-picked to release-5.4 from a source PR. labels Aug 10, 2022
@VelocityLight VelocityLight added cherry-pick-approved Cherry pick PR approved by release team. and removed do-not-merge/cherry-pick-not-approved labels Aug 10, 2022
@overvenus overvenus closed this Aug 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ticdc Issues or PRs related to TiCDC. cherry-pick-approved Cherry pick PR approved by release team. 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. status/LGT2 Indicates that a PR has LGTM 2. type/cherry-pick-for-release-5.4 This PR is cherry-picked to release-5.4 from a source PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants