Skip to content

localbackend: release the service safe point on finish checksum#62143

Merged
ti-chi-bot[bot] merged 6 commits into
pingcap:masterfrom
D3Hunter:imp-checksum-task-ks
Jul 2, 2025
Merged

localbackend: release the service safe point on finish checksum#62143
ti-chi-bot[bot] merged 6 commits into
pingcap:masterfrom
D3Hunter:imp-checksum-task-ks

Conversation

@D3Hunter

@D3Hunter D3Hunter commented Jul 2, 2025

Copy link
Copy Markdown
Contributor

What problem does this PR solve?

Issue Number: ref #61702, close #62142

Problem Summary:

What changed and how does it work?

send a request with TTL=0 to remove it, see https://github.com/tikv/pd/blob/29ead019cd0982a3120bc79d4a4d19199dab2279/server/grpc_service.go#L2280-L2284 too

Check List

Tests

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

with master, we can see the service safe point still exist after lightning exist, it will expire after 10m

➜  lightning /Users/user/code/pingcap/tidb/bin/tidb-lightning-master --config test.toml
Verbose debug logs will be written to lightning.log

tidb lightning exit successfully
➜  lightning etcdctl --endpoints localhost:2379 get --prefix ""|grep -a lightning
/pd/7522392937985088901/gc/safe_point/service/lightning-c8a20fff-07bd-4744-bfa5-a12e529847c5
{"service_id":"lightning-c8a20fff-07bd-4744-bfa5-a12e529847c5","expired_at":1751444458,"safe_point":459130498717057084}

with this PR, it's removed after exist

➜  lightning /Users/user/code/pingcap/tidb/bin/tidb-lightning -V
Release Version: v9.0.0-beta.2.pre-22-ga116ca4c78
Git Commit Hash: a116ca4c789a3c751fdee29bebada13594668312
Git Branch: imp-checksum-task-ks
Go Version: go1.23.10
UTC Build Time: 2025-07-02 08:16:00
Race Enabled: false
➜  lightning /Users/user/code/pingcap/tidb/bin/tidb-lightning --config test.toml
Verbose debug logs will be written to lightning.log

tidb lightning exit successfully
➜  lightning etcdctl --endpoints localhost:2379 get --prefix ""|grep -a lightning
  • No need to test
    • I checked and no code files have been changed.

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

None

@ti-chi-bot ti-chi-bot Bot added 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. labels Jul 2, 2025
@tiprow

tiprow Bot commented Jul 2, 2025

Copy link
Copy Markdown

Hi @D3Hunter. Thanks for your PR.

PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.

I understand the commands that are listed here.

Details

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-sigs/prow repository.

@ti-chi-bot ti-chi-bot Bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Jul 2, 2025
@codecov

codecov Bot commented Jul 2, 2025

Copy link
Copy Markdown

Codecov Report

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

Project coverage is 73.5495%. Comparing base (94bfb3d) to head (2e7e178).
Report is 18 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #62143        +/-   ##
================================================
+ Coverage   72.9233%   73.5495%   +0.6262%     
================================================
  Files          1739       1770        +31     
  Lines        482858     493886     +11028     
================================================
+ Hits         352116     363251     +11135     
+ Misses       109170     108349       -821     
- Partials      21572      22286       +714     
Flag Coverage Δ
integration 45.2002% <87.0967%> (?)
unit 72.2595% <80.0000%> (+0.0806%) ⬆️

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

Components Coverage Δ
dumpling 52.7804% <ø> (ø)
parser ∅ <ø> (∅)
br 45.6537% <ø> (-0.6771%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ti-chi-bot

ti-chi-bot Bot commented Jul 2, 2025

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: GMHDBJD, lance6716

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

The pull request process is described here

Details 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 Jul 2, 2025
@ti-chi-bot

ti-chi-bot Bot commented Jul 2, 2025

Copy link
Copy Markdown

[LGTM Timeline notifier]

Timeline:

  • 2025-07-02 09:02:31.063420176 +0000 UTC m=+1472003.786599158: ☑️ agreed by GMHDBJD.
  • 2025-07-02 09:22:47.855020481 +0000 UTC m=+1473220.578199463: ☑️ agreed by lance6716.

@D3Hunter

D3Hunter commented Jul 2, 2025

Copy link
Copy Markdown
Contributor Author

/retest

@tiprow

tiprow Bot commented Jul 2, 2025

Copy link
Copy Markdown

@D3Hunter: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

Details

In response to this:

/retest

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-sigs/prow repository.

@D3Hunter

D3Hunter commented Jul 2, 2025

Copy link
Copy Markdown
Contributor Author

/retest

@tiprow

tiprow Bot commented Jul 2, 2025

Copy link
Copy Markdown

@D3Hunter: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

Details

In response to this:

/retest

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-sigs/prow repository.

@ti-chi-bot ti-chi-bot Bot merged commit 6106300 into pingcap:master Jul 2, 2025
23 checks passed
@D3Hunter D3Hunter deleted the imp-checksum-task-ks branch July 2, 2025 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved 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.

lightning: service safe point is not cleared on exit

3 participants