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

gomod: fix MinSafeTS might be set to MaxUint64 permanently (#47469) #47554

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-6.5 This PR is cherry-picked to release-6.5 from a source PR. labels Oct 11, 2023
@ti-chi-bot ti-chi-bot added the cherry-pick-approved Cherry pick PR approved by release team. label Oct 11, 2023
Signed-off-by: husharp <[email protected]>
@HuSharp HuSharp force-pushed the cherry-pick-47469-to-release-6.5 branch from cda1ff4 to 608a278 Compare November 21, 2023 07:52
@HuSharp
Copy link
Contributor

HuSharp commented Nov 21, 2023

@JmPotato @nolouch PTAL, thx!

@HuSharp
Copy link
Contributor

HuSharp commented Nov 21, 2023

client-go pr tikv/client-go#999

@@ -90,7 +90,7 @@ require (
github.com/stretchr/testify v1.8.0
github.com/tdakkota/asciicheck v0.1.1
github.com/tiancaiamao/appdash v0.0.0-20181126055449-889f96f722a2
github.com/tikv/client-go/v2 v2.0.4-0.20230912041415-9c163cc8574b
github.com/tikv/client-go/v2 v2.0.4-0.20231121070837-c1041a4358a2
Copy link
Contributor

@HuSharp HuSharp Nov 21, 2023

Choose a reason for hiding this comment

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

image

@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Nov 21, 2023
Copy link

ti-chi-bot bot commented Nov 21, 2023

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: JmPotato
Once this PR has been reviewed and has the lgtm label, please assign buchuitoudegou for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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

Copy link

ti-chi-bot bot commented Nov 21, 2023

[LGTM Timeline notifier]

Timeline:

  • 2023-11-21 07:57:31.662749007 +0000 UTC m=+304680.327975199: ☑️ agreed by JmPotato.

Copy link

codecov bot commented Nov 21, 2023

Codecov Report

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

Additional details and impacted files
@@               Coverage Diff                @@
##             release-6.5     #47554   +/-   ##
================================================
  Coverage               ?   73.6594%           
================================================
  Files                  ?       1085           
  Lines                  ?     348930           
  Branches               ?          0           
================================================
  Hits                   ?     257020           
  Misses                 ?      75440           
  Partials               ?      16470           

Copy link

ti-chi-bot bot commented Nov 22, 2023

PR needs rebase.

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 the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 22, 2023
@HuSharp
Copy link
Contributor

HuSharp commented Nov 23, 2023

@tangenta
Copy link
Contributor

6.5 updated by #48768 (files)

@tangenta tangenta closed this Nov 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-pick-approved Cherry pick PR approved by release team. needs-1-more-lgtm Indicates a PR needs 1 more LGTM. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. 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-6.5 This PR is cherry-picked to release-6.5 from a source PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants