@@ -1,3 +1,6 @@
|
||||
#![allow(unused_variables)] // TODO(you): remove this lint after implementing this mod
|
||||
#![allow(dead_code)] // TODO(you): remove this lint after implementing this mod
|
||||
|
||||
pub mod txn;
|
||||
pub mod watermark;
|
||||
|
||||
@@ -23,6 +26,7 @@ pub(crate) struct CommittedTxnData {
|
||||
|
||||
pub(crate) struct LsmMvccInner {
|
||||
pub(crate) write_lock: Mutex<()>,
|
||||
pub(crate) commit_lock: Mutex<()>,
|
||||
pub(crate) ts: Arc<Mutex<(u64, Watermark)>>,
|
||||
pub(crate) committed_txns: Arc<Mutex<BTreeMap<u64, CommittedTxnData>>>,
|
||||
}
|
||||
@@ -31,6 +35,7 @@ impl LsmMvccInner {
|
||||
pub fn new(initial_ts: u64) -> Self {
|
||||
Self {
|
||||
write_lock: Mutex::new(()),
|
||||
commit_lock: Mutex::new(()),
|
||||
ts: Arc::new(Mutex::new((initial_ts, Watermark::new()))),
|
||||
committed_txns: Arc::new(Mutex::new(BTreeMap::new())),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user