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.

@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
sticnarf added a commit to sticnarf/client-go that referenced this pull request Jan 31, 2023
sticnarf added a commit to sticnarf/client-go that referenced this pull request Jan 31, 2023
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 <[email protected]>

* add more info for cloning SnapshotRuntimeStats

Signed-off-by: TonsnakeLin <[email protected]>

* shallow copy SnapshotRuntimeStats

Signed-off-by: TonsnakeLin <[email protected]>

Signed-off-by: TonsnakeLin <[email protected]>
Co-authored-by: Yilin Chen <[email protected]>

* fix data race in the LockKeys (#655)

Signed-off-by: Weizhen Wang <[email protected]>

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

Signed-off-by: Yilin Chen <[email protected]>

* Rewind after cacheGC reaches the end (#678)

Signed-off-by: Yilin Chen <[email protected]>

---------

Signed-off-by: TonsnakeLin <[email protected]>
Signed-off-by: Weizhen Wang <[email protected]>
Signed-off-by: Yilin Chen <[email protected]>
Co-authored-by: TonsnakeLin <[email protected]>
Co-authored-by: Weizhen Wang <[email protected]>
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 <[email protected]>

* Change interval to 1s and regionPerRound to 50

Signed-off-by: Yilin Chen <[email protected]>

* Rewind after cacheGC reaches the end (#678)

Signed-off-by: Yilin Chen <[email protected]>

---------

Signed-off-by: Yilin Chen <[email protected]>
disksing pushed a commit that referenced this pull request Jan 31, 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