Skip to content

tso: merge lastTS and lastArrivalTS into an atomic pointer (#1054)#1064

Merged
disksing merged 2 commits intotikv:tidb-6.5from
you06:6.5-tso/merge-last-ts
Nov 21, 2023
Merged

tso: merge lastTS and lastArrivalTS into an atomic pointer (#1054)#1064
disksing merged 2 commits intotikv:tidb-6.5from
you06:6.5-tso/merge-last-ts

Conversation

@you06
Copy link
Contributor

@you06 you06 commented Nov 20, 2023

Cherry pick #1054 to tidb-6.5 branch, which fix the monotonic issue of stale TSO.

Replace atomic.Pointer with unsafe.Pointer.

* fix the issue that stale timestamp may be a future one

Signed-off-by: you06 <you1474600@gmail.com>

* add regression test

Signed-off-by: you06 <you1474600@gmail.com>

* lazy init lastTSO

Signed-off-by: you06 <you1474600@gmail.com>

* fix panic

Signed-off-by: you06 <you1474600@gmail.com>

* address comment

Signed-off-by: you06 <you1474600@gmail.com>

---------

Signed-off-by: you06 <you1474600@gmail.com>
Signed-off-by: you06 <you1474600@gmail.com>
@disksing disksing merged commit 1946394 into tikv:tidb-6.5 Nov 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants