Skip to content

Conversation

ti-chi-bot
Copy link
Member

This is an automated cherry-pick of #47469

Signed-off-by: husharp [email protected]<!--

Thank you for contributing to TiDB!

PR Title Format:

  1. pkg [, pkg2, pkg3]: what's changed
  2. *: what's changed

-->

What problem does this PR solve?

Issue Number: close #47468

Problem Summary:

What is changed and how it works?

The core question is getting safe ts in client-go

  • we introduce PD API to not execute go func which for KV request, resulting in not updating safeTSMap.
    • updateMinSafeTS relies on safeTSMap which makes sense(because actually, we can call updateMinSafeTS to kvReuqestUpdater[to indicate func base]).
  • And we need to update minsafeTS to make sure when API fails we can fall back to the original way which is by kv request.
  • But the core problem is: updateMinSafeTS will return maxUnit64 when the first kv request returns 0 and then although PD API returns correctly[maybe kv is not initialized], TS can not change maxUnit64.
    • to resolve this question, we need to regard maxUnit64 as 0 which means there is an initial state.

Check List

Tests

  • Manual test (add detailed scripts or steps below)

Release note

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

None

@ti-chi-bot ti-chi-bot added ok-to-test Indicates a PR is ready to be tested. 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. type/cherry-pick-for-release-7.1 This PR is cherry-picked to release-7.1 from a source PR. labels Oct 11, 2023
Signed-off-by: husharp <[email protected]>
@HuSharp HuSharp force-pushed the cherry-pick-47469-to-release-7.1 branch from f5e4e4e to 96ca5ac Compare October 11, 2023 09:56
@HuSharp
Copy link
Contributor

HuSharp commented Oct 11, 2023

@JmPotato @nolouch @tangenta PTAL as well, thx!

@ti-chi-bot ti-chi-bot added the cherry-pick-approved Cherry pick PR approved by release team. label Oct 11, 2023
@@ -94,7 +94,7 @@ require (
github.com/stretchr/testify v1.8.2
github.com/tdakkota/asciicheck v0.2.0
github.com/tiancaiamao/appdash v0.0.0-20181126055449-889f96f722a2
github.com/tikv/client-go/v2 v2.0.8-0.20230918072237-01087502b780
Copy link
Contributor

@HuSharp HuSharp Oct 11, 2023

Choose a reason for hiding this comment

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

@codecov
Copy link

codecov bot commented Oct 11, 2023

Codecov Report

❗ No coverage uploaded for pull request base (release-7.1@9fdf362). Click here to learn what that means.
The diff coverage is n/a.

Additional details and impacted files
@@               Coverage Diff                @@
##             release-7.1     #47555   +/-   ##
================================================
  Coverage               ?   73.4273%           
================================================
  Files                  ?       1205           
  Lines                  ?     377072           
  Branches               ?          0           
================================================
  Hits                   ?     276874           
  Misses                 ?      82525           
  Partials               ?      17673           

@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Oct 12, 2023
@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Oct 12, 2023
@ti-chi-bot
Copy link

ti-chi-bot bot commented Oct 12, 2023

[LGTM Timeline notifier]

Timeline:

  • 2023-10-12 02:19:13.312763353 +0000 UTC m=+1277950.899873483: ☑️ agreed by JmPotato.
  • 2023-10-12 02:53:33.694919082 +0000 UTC m=+1280011.282029228: ☑️ agreed by nolouch.

@ti-chi-bot
Copy link

ti-chi-bot bot commented Oct 12, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JmPotato, nolouch, tangenta

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

@ti-chi-bot ti-chi-bot bot added the approved label Oct 12, 2023
@ti-chi-bot ti-chi-bot bot merged commit 0d9903c into pingcap:release-7.1 Oct 12, 2023
@HuSharp HuSharp deleted the cherry-pick-47469-to-release-7.1 branch October 12, 2023 07:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved cherry-pick-approved Cherry pick PR approved by release team. lgtm ok-to-test Indicates a PR is ready to be tested. 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. type/cherry-pick-for-release-7.1 This PR is cherry-picked to release-7.1 from a source PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants