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

oracle: setLastTS always push tso to higher value #1533

Merged
merged 2 commits into from
Dec 20, 2024

Conversation

you06
Copy link
Contributor

@you06 you06 commented Dec 20, 2024

Ref pingcap/tidb#57786

The setLastTS can be called concurrently, so that the tso and arrival may have different order, lastTSO1.tso < lastTSO2.tso meanwhile lastTSO1.arrival > lastTSO2.arrival. In this case, when lastTS is set to lastTSO1, the update of lastTSO2 will fail and later when we check lastTS, it's not true last.

This PR changes the setLastTS that it'll always push the lastTS to the max TSO we received.

@ti-chi-bot ti-chi-bot bot added dco-signoff: yes Indicates the PR's author has signed the dco. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Dec 20, 2024
@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Dec 20, 2024
@ti-chi-bot ti-chi-bot bot added the lgtm label Dec 20, 2024
Copy link

ti-chi-bot bot commented Dec 20, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: crazycs520, MyonKeminta

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:
  • OWNERS [MyonKeminta,crazycs520]

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 removed the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Dec 20, 2024
Copy link

ti-chi-bot bot commented Dec 20, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-12-20 06:01:09.750046393 +0000 UTC m=+1195859.838848935: ☑️ agreed by MyonKeminta.
  • 2024-12-20 06:09:30.967480711 +0000 UTC m=+1196361.056283239: ☑️ agreed by crazycs520.

@ti-chi-bot ti-chi-bot bot merged commit c5d92ba into tikv:master Dec 20, 2024
12 checks passed
crazycs520 pushed a commit to crazycs520/client-go that referenced this pull request Dec 20, 2024
crazycs520 pushed a commit to crazycs520/client-go that referenced this pull request Dec 20, 2024
you06-pingcap pushed a commit to you06/client-go that referenced this pull request Jan 7, 2025
you06-pingcap pushed a commit to you06/client-go that referenced this pull request Jan 7, 2025
you06-pingcap pushed a commit to you06/client-go that referenced this pull request Jan 7, 2025
you06-pingcap pushed a commit to you06/client-go that referenced this pull request Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved dco-signoff: yes Indicates the PR's author has signed the dco. lgtm 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.

3 participants