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

Doubly skiplist for reverse scan (#116) #278

Merged
merged 5 commits into from
May 11, 2022
Merged

Conversation

tabokie
Copy link
Member

@tabokie tabokie commented May 9, 2022

Ref #277

When the iterator read keys in reverse order, each Prev() function cost O(log n) times. So I add prev pointer for every node in skiplist to improve the Prev() function.

Signed-off-by: Little-Wallace liuwei@pingcap.com

Implemented new virtual functions:

  • InsertWithHintConcurrently
  • FindRandomEntry

Signed-off-by: tabokie xy.tao@outlook.com

@tabokie tabokie force-pushed the pick-116 branch 3 times, most recently from e1832c7 to bc8a377 Compare May 9, 2022 13:17
@purelind
Copy link

/run-test

Signed-off-by: Little-Wallace liuwei@pingcap.com

When the iterator read keys in reverse order, each Prev() function cost O(log n) times. So I add prev pointer for every node in skiplist to improve the Prev() function.

Signed-off-by: tabokie <xy.tao@outlook.com>
Signed-off-by: tabokie <xy.tao@outlook.com>
Signed-off-by: tabokie <xy.tao@outlook.com>
Signed-off-by: tabokie <xy.tao@outlook.com>
Signed-off-by: tabokie <xy.tao@outlook.com>
@tabokie tabokie merged commit 5d01038 into tikv:6.29.tikv May 11, 2022
@tabokie tabokie deleted the pick-116 branch May 11, 2022 06:31
@v01dstar v01dstar mentioned this pull request Sep 24, 2024
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