aboutsummaryrefslogtreecommitdiffstats
path: root/log_db/src/memtable_primary.rs
diff options
context:
space:
mode:
authorJan Tuomi <jan@jantuomi.fi>2024-11-21 16:38:20 +0200
committerJan Tuomi <jan@jantuomi.fi>2024-11-21 16:38:20 +0200
commit1ee30efe415695e1b7d9b6390778a50e8168df04 (patch)
tree5a4f79023d797352f7d126edfbd2a6da0323a6f2 /log_db/src/memtable_primary.rs
parent1c3e5f3c1735545e5d7fe45c1fce36874ecc7949 (diff)
Start reimplementing memtable changes after revert
Diffstat (limited to 'log_db/src/memtable_primary.rs')
-rw-r--r--log_db/src/memtable_primary.rs10
1 files changed, 3 insertions, 7 deletions
diff --git a/log_db/src/memtable_primary.rs b/log_db/src/memtable_primary.rs
index 9d7e1e8..6a28f30 100644
--- a/log_db/src/memtable_primary.rs
+++ b/log_db/src/memtable_primary.rs
@@ -9,7 +9,7 @@ pub struct PrimaryMemtable {
///
/// Note: it must be invariant that all memtables (primary and secondary)
/// contain the same keys.
- records: BTreeMap<IndexableValue, Record>,
+ records: BTreeMap<IndexableValue, LogKey>,
}
impl PrimaryMemtable {
@@ -19,15 +19,11 @@ impl PrimaryMemtable {
}
}
- pub fn set(&mut self, key: &IndexableValue, value: &Record) {
+ pub fn set(&mut self, key: &IndexableValue, value: &LogKey) {
self.records.insert(key.clone(), value.clone());
}
- pub fn get(&mut self, key: &IndexableValue) -> Option<&Record> {
- self.records.get(key)
- }
-
- pub fn get_without_update(&self, key: &IndexableValue) -> Option<&Record> {
+ pub fn get(&self, key: &IndexableValue) -> Option<&LogKey> {
self.records.get(key)
}
}