-
Notifications
You must be signed in to change notification settings - Fork 765
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
[metasrv] Support sled tree level transaction #2422
Comments
There seems to be a bunch update to be made to the code base to achieve this task. Some sub-issues will let other understand this task much easier and let other people get involved. 😃 |
Implementation path:
Current problems
problems ref: spacejam/sled#1143 (comment) |
struct StateMachine {
fn apply() {
self.tree.transaction(|x:view| {
let ourSledTree = TxnSledTree::from(x)
let res = self.apply_cmd(ourSledTree, cmd);
match res {
// translate to our error code.
}
})
}
}
trait TreeAPI {
fn get();
fn insert();
fn remove();
fn apply_batch();
}
struct TxnSledTree {
}
impl TreeAPI for TxnSledTree {}
impl TreeAPI for SledTree {} |
Maybe it is time to have a discussion about what the plan for next move is about this issue? |
Yup, I'll list the ideal transaction APIs that I want the KV store to have tomorrow, and then we can discuss if we can achieve the goal. |
I guess transaction is needed here because the range scan is not atomic in Bw-tree by design. In other words, sled (an implementation of bwtree) does not support snapshot isolation, which is very important for analytic queries. The paper below provides a way to implement snapshot isolation for another KV store called Kvell. https://www.usenix.org/system/files/osdi20-lepers.pdf The workload might be smaller than implementing a transaction manager from scratch. |
@jyizheng |
Some investigation:
|
As a result, Sled meets our current needs, although the transaction implementation is not so elegant. |
Some concerns for switching to Rocksdb:
|
I think we should list our metasrv roadmap to see if we have more performance and functional requirements, then we can make decisions to switch or not. |
@ariesdevil Let's update status on this issue:DDD |
We leave an issue(#3309 ) and close this issue now, if you have any ideas, feel free to reopen this issue. |
Summary
Support sled tree level transaction for metasrv
Tasks
Implementation path:
StateMachine::apply
supports transaction ([metasrv] makeStateMachine::apply
use transaction to perform operations #3102 )The text was updated successfully, but these errors were encountered: