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

Use skiplist tailored for LSM-tree #95

Open
marvin-j97 opened this issue Dec 14, 2024 · 4 comments
Open

Use skiplist tailored for LSM-tree #95

marvin-j97 opened this issue Dec 14, 2024 · 4 comments
Assignees
Labels

Comments

@marvin-j97
Copy link
Contributor

marvin-j97 commented Dec 14, 2024

  • No need for remove and get() methods, we only need range() and insert()

  • Arena-based (store towers/nodes in arena)

  • Should probably be a new repo - will definitely involve unsafe

  • Needs to be concurrent, at least reads shouldn't get blocked by writes

@marvin-j97 marvin-j97 added enhancement New feature or request help wanted Extra attention is needed performance epic test labels Dec 14, 2024
@guycipher
Copy link

guycipher commented Dec 15, 2024

Why not a read-write lock skiplist? Why the granular concurrency? It will lead to complexity and unsafely no? From experience I can’t say you’ll get major performance boosts doing a granular approach. Also, why just range? What about iteration for cursing through?? Forwards and backwards the entire list. Range on a memtable?

@marvin-j97
Copy link
Contributor Author

Why not a read-write lock skiplist? Why the granular concurrency? It will lead to complexity and unsafely no? From experience I can’t say you’ll get major performance boosts doing a granular approach.

Well the current skiplist already is concurrent.
Granular not being better is anecdotal, the point is to have a lock-free read path, and make reads not blocking writes too much.

Also, why just range? What about iteration for cursing through?? Forwards and backwards the entire list. Range on a memtable?

Range is an Iterator. More correctly a DoubleEndedIterator.

@guycipher
Copy link

guycipher commented Dec 15, 2024

Well the current skiplist already is concurrent.
Granular not being better is anecdotal, the point is to have a lock-free read path, and make reads not blocking writes too much.

I'm just providing some perspective. Yes that is nice but comes with complexity and dare I say it doesn't provide much of a boost as it does bugs and uncertainty; Since the skip list is already in memory it's rather performent no?

Range is an Iterator. More correctly a DoubleEndedIterator.
I thought this was more specific to databases. A range iterator is like hey give me 100-3000 and you can only iterate between those, that's what I understood by it. I mean this can be done in any way truly. Here's some more food for thought can iterating through the memtable and sstables from the memtable to the last sstable be accomplished?

@marvin-j97
Copy link
Contributor Author

marvin-j97 commented Dec 15, 2024

Yes that is nice but comes with complexity and dare I say it doesn't provide much of a boost as it does bugs and uncertainty; Since the skip list is already in memory it's rather performent no?

It's not about boosting performance, it's about keeping the current locking behaviour, but not depending on crossbeam's epoch system. For long reads, having a RwLock would block writes.

Here's some more food for thought can iterating through the memtable and sstables from the memtable to the last sstable be accomplished?

And yes, that's what an LSM-tree implicitly does.

@marvin-j97 marvin-j97 removed the help wanted Extra attention is needed label Dec 24, 2024
@marvin-j97 marvin-j97 self-assigned this Dec 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants