-
Notifications
You must be signed in to change notification settings - Fork 54
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
perf: Optimize transaction write memtable speed #223
Comments
Transaction still support If I am misunderstanding, please be kind to share more about your thoughts. |
I am not referring to the use of a B-tree structure to store transactions data during the transaction process. Using a B-tree is reasonable, but when a transaction commits and writes the memtable, it is written in the same way as non transaction writing, using skiplist. According to my description above, it can be replaced with a vector,The code location is:
|
I got it, it does make sense, let's have a try. |
(I only read some modules of tonbo, maybe I have some misunderstandings)
I noticed that tonbo can be inserted in two ways, transactional and non transactional:
Memtable may be read and written simultaneously, and using
skiplist
can effectively balance read and write operationsIt will first be written in the
local BTreeMap
to the transaction, and only after the commit is committed and there are no conflicts, will the memtable writing actually take place. In this case:snapshot read
.So, for this situation, there is no need to use a balanced read-write data structure, just use an vector for append and sort during flush. Based on my experience, the write performance will be greatly improved.
If the suggestion is beneficial, I would be happy to complete this task because I think tonbo is an interesting project. :)
The text was updated successfully, but these errors were encountered: