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

Rewind after region cache GC reaches the end #678

Merged
merged 1 commit into from
Jan 30, 2023

Conversation

sticnarf
Copy link
Collaborator

#664 was incomplete. The searching cursor increases monotonically without rewinding. So, if the regions split after the cursor passes their start keys, they will not be cleared after being stale.

This PR rewinds the cursor after reaching the end.

Signed-off-by: Yilin Chen <sticnarf@gmail.com>
@sticnarf sticnarf requested a review from ekexium January 30, 2023 07:22
@sticnarf sticnarf merged commit 78470ad into tikv:master Jan 30, 2023
sticnarf added a commit to sticnarf/client-go that referenced this pull request Jan 30, 2023
Signed-off-by: Yilin Chen <sticnarf@gmail.com>
sticnarf added a commit to sticnarf/client-go that referenced this pull request Jan 31, 2023
Signed-off-by: Yilin Chen <sticnarf@gmail.com>
sticnarf added a commit to sticnarf/client-go that referenced this pull request Jan 31, 2023
Signed-off-by: Yilin Chen <sticnarf@gmail.com>
disksing pushed a commit that referenced this pull request Jan 31, 2023
* RuntimeStat: Clone `SnapshotRuntimeStats` Completely (#641)

* add more info for cloning SnapshotRuntimeStats

Signed-off-by: TonsnakeLin <lpbgytong@163.com>

* add more info for cloning SnapshotRuntimeStats

Signed-off-by: TonsnakeLin <lpbgytong@163.com>

* shallow copy SnapshotRuntimeStats

Signed-off-by: TonsnakeLin <lpbgytong@163.com>

Signed-off-by: TonsnakeLin <lpbgytong@163.com>
Co-authored-by: Yilin Chen <sticnarf@gmail.com>

* fix data race in the LockKeys (#655)

Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>

* Add a background region cache GC goroutine (#664)

Signed-off-by: Yilin Chen <sticnarf@gmail.com>

* Rewind after cacheGC reaches the end (#678)

Signed-off-by: Yilin Chen <sticnarf@gmail.com>

---------

Signed-off-by: TonsnakeLin <lpbgytong@163.com>
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
Signed-off-by: Yilin Chen <sticnarf@gmail.com>
Co-authored-by: TonsnakeLin <87681388+TonsnakeLin@users.noreply.github.com>
Co-authored-by: Weizhen Wang <wangweizhen@pingcap.com>
disksing pushed a commit that referenced this pull request Jan 31, 2023
* Add a background region cache GC goroutine (#664)

* Add a background region cache GC goroutine

Signed-off-by: Yilin Chen <sticnarf@gmail.com>

* Change interval to 1s and regionPerRound to 50

Signed-off-by: Yilin Chen <sticnarf@gmail.com>

* Rewind after cacheGC reaches the end (#678)

Signed-off-by: Yilin Chen <sticnarf@gmail.com>

---------

Signed-off-by: Yilin Chen <sticnarf@gmail.com>
disksing pushed a commit that referenced this pull request Jan 31, 2023
Signed-off-by: Yilin Chen <sticnarf@gmail.com>
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