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

advancer: fix the incorrect gc safepoint behaviours #52835

Merged
merged 6 commits into from
Apr 25, 2024

Conversation

3pointer
Copy link
Contributor

@3pointer 3pointer commented Apr 23, 2024

What problem does this PR solve?

Issue Number: ref #52082

Problem Summary:

  1. Advancer didn't handle GC response correct, if set the safepoint smaller(Normally it won't happen, because the ts from advancer always closed to the current time(RPO <= 5min)) than current service safepoint, it still get the response without error.
  2. Set service safepoint to 0 won't delete the value.

What changed and how does it work?

  1. handle the response with smaller ts request.
  2. add new interface to remove service safepoint.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • 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.

Fix the issue that del task won't clean up service safepoint.

@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-linked-issue do-not-merge/needs-tests-checked do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Apr 23, 2024
Copy link

ti-chi-bot bot commented Apr 23, 2024

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Apr 23, 2024
Copy link

tiprow bot commented Apr 23, 2024

Hi @3pointer. 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.

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.

@ti-chi-bot ti-chi-bot bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Apr 23, 2024
@ti-chi-bot ti-chi-bot bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed do-not-merge/needs-linked-issue do-not-merge/needs-tests-checked release-note-none Denotes a PR that doesn't merit a release note. labels Apr 23, 2024
@3pointer 3pointer marked this pull request as ready for review April 23, 2024 09:07
@ti-chi-bot ti-chi-bot bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 23, 2024
Copy link

codecov bot commented Apr 23, 2024

Codecov Report

Attention: Patch coverage is 50.00000% with 7 lines in your changes missing coverage. Please review.

Project coverage is 57.1790%. Comparing base (4354682) to head (dc5cc22).
Report is 1318 commits behind head on master.

Additional details and impacted files
@@                Coverage Diff                @@
##             master     #52835         +/-   ##
=================================================
- Coverage   72.3201%   57.1790%   -15.1412%     
=================================================
  Files          1474       1595        +121     
  Lines        427611     608914     +181303     
=================================================
+ Hits         309249     348171      +38922     
- Misses        99057     237223     +138166     
- Partials      19305      23520       +4215     
Flag Coverage Δ
integration 38.8385% <50.0000%> (?)
unit 71.9058% <0.0000%> (+0.7179%) ⬆️

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

Components Coverage Δ
dumpling 53.9957% <ø> (ø)
parser ∅ <ø> (∅)
br 61.8614% <50.0000%> (+20.7227%) ⬆️

Copy link
Contributor

@YuJuncen YuJuncen left a comment

Choose a reason for hiding this comment

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

rest lgtm

br/pkg/streamhelper/advancer_env.go Outdated Show resolved Hide resolved
@ti-chi-bot ti-chi-bot bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Apr 23, 2024
@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Apr 24, 2024
Copy link

ti-chi-bot bot commented Apr 24, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-04-23 09:44:56.480819679 +0000 UTC m=+80653.220722625: ☑️ agreed by YuJuncen.
  • 2024-04-24 05:13:21.013519069 +0000 UTC m=+150757.753421981: ☑️ agreed by Leavrth.

@hawkingrei
Copy link
Member

/retest

Copy link

ti-chi-bot bot commented Apr 24, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Leavrth, YuJuncen

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

@hawkingrei
Copy link
Member

/ok-to-test

@ti-chi-bot ti-chi-bot bot added the ok-to-test Indicates a PR is ready to be tested. label Apr 25, 2024
@3pointer
Copy link
Contributor Author

/test check-dev2

Copy link

tiprow bot commented Apr 25, 2024

@3pointer: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

  • /test fast_test_tiprow
  • /test tidb_parser_test

Use /test all to run all jobs.

In response to this:

/test check-dev2

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.

@hawkingrei
Copy link
Member

/retest

@ti-chi-bot ti-chi-bot bot merged commit 545b4a3 into pingcap:master Apr 25, 2024
32 checks passed
@YuJuncen
Copy link
Contributor

/run-cherry-picker

@YuJuncen YuJuncen added needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. needs-cherry-pick-release-8.1 Should cherry pick this PR to release-8.1 branch. labels Oct 17, 2024
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-8.1: #56697.

@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-7.5: #56698.

@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-7.1: #56699.

ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. needs-cherry-pick-release-8.1 Should cherry pick this PR to release-8.1 branch. ok-to-test Indicates a PR is ready to be tested. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants