finish serializable check

Signed-off-by: Alex Chi <iskyzh@gmail.com>
This commit is contained in:
Alex Chi
2024-01-26 22:20:06 +08:00
parent 78ec7c9375
commit 0d64ac090e
5 changed files with 60 additions and 16 deletions

View File

@@ -14,8 +14,10 @@ use crate::lsm_storage::LsmStorageInner;
use self::{txn::Transaction, watermark::Watermark};
pub(crate) struct CommittedTxnData {
pub(crate) key_hashes: Vec<u32>,
pub(crate) key_hashes: HashSet<u32>,
#[allow(dead_code)]
pub(crate) read_ts: u64,
#[allow(dead_code)]
pub(crate) commit_ts: u64,
}
@@ -58,7 +60,7 @@ impl LsmMvccInner {
local_storage: Arc::new(SkipMap::new()),
committed: Arc::new(AtomicBool::new(false)),
key_hashes: if serializable {
Some(Mutex::new(HashSet::new()))
Some(Mutex::new((HashSet::new(), HashSet::new())))
} else {
None
},