Rewind after region cache GC reaches the end#678
Merged
sticnarf merged 1 commit intotikv:masterfrom Jan 30, 2023
Merged
Conversation
Signed-off-by: Yilin Chen <sticnarf@gmail.com>
ekexium approved these changes 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>
12 tasks
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
This was referenced Jan 31, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#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.