Skip to content

oracle: setLastTS always push tso to higher value#1533

Merged
ti-chi-bot[bot] merged 2 commits intotikv:masterfrom
you06:tso/always-push-last-ts
Dec 20, 2024
Merged

oracle: setLastTS always push tso to higher value#1533
ti-chi-bot[bot] merged 2 commits intotikv:masterfrom
you06:tso/always-push-last-ts

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.

Signed-off-by: you06 <you1474600@gmail.com>
Signed-off-by: you06 <you1474600@gmail.com>
@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
@ti-chi-bot
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

Details 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
@ti-chi-bot
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
crazycs520 pushed a commit to crazycs520/client-go that referenced this pull request Dec 20, 2024
 

Signed-off-by: you06 <you1474600@gmail.com>
crazycs520 pushed a commit to crazycs520/client-go that referenced this pull request Dec 20, 2024
 

Signed-off-by: you06 <you1474600@gmail.com>
you06-pingcap pushed a commit to you06/client-go that referenced this pull request Jan 7, 2025
 

Signed-off-by: you06 <you1474600@gmail.com>
you06-pingcap pushed a commit to you06/client-go that referenced this pull request Jan 7, 2025
 

Signed-off-by: you06 <you1474600@gmail.com>
you06-pingcap pushed a commit to you06/client-go that referenced this pull request Jan 7, 2025
 

Signed-off-by: you06 <you1474600@gmail.com>
you06-pingcap pushed a commit to you06/client-go that referenced this pull request Jan 7, 2025
 

Signed-off-by: you06 <you1474600@gmail.com>
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