Skip to content

Commit

Permalink
Moving to BTreeMaps for table contents.
Browse files Browse the repository at this point in the history
  • Loading branch information
rohitkulshreshtha committed Jan 9, 2025
1 parent 9acad6d commit 1d9bf56
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 7 deletions.
18 changes: 15 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions datastores/gossip_kv/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ publish = false
clap = { version = "4.5.4", features = ["derive", "env"] }
config = "0.14.0"
governor = "0.7.0"
hashbrown = "0.15.2"
hostname = "0.4.0"
dfir_rs = { path= "../../dfir_rs" }
lattices = { path = '../../lattices'}
Expand Down
7 changes: 3 additions & 4 deletions datastores/gossip_kv/kv/model.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
use std::collections::{HashMap, HashSet};
use std::sync::Arc;
use dfir_rs::lattices::map_union::MapUnionHashMap;
use dfir_rs::lattices::set_union::SetUnionHashSet;
use dfir_rs::lattices::{DomPair, Max, WithBot, Point};
use lattices::collections::{SingletonMap, SingletonSet};
use lattices::map_union::MapUnionSingletonMap;
use lattices::set_union::{SetUnionBTreeSet, SetUnionSingletonSet};
use lattices::map_union::{MapUnionBTreeMap, MapUnionSingletonMap};
use lattices::set_union::{SetUnion, SetUnionArray, SetUnionBTreeSet, SetUnionSingletonSet, SetUnionVec};
use crate::buffer_pool::AutoReturnBuffer;
use crate::{Key, Namespace};

Expand All @@ -19,7 +18,7 @@ pub type RowKey = String;
pub type RowValue<C> = DomPair<C, SetUnionBTreeSet<String>>;

/// A map from row keys to values in a table.
pub type Table<V> = MapUnionHashMap<RowKey, V>;
pub type Table<V> = MapUnionBTreeMap<RowKey, V>;

/// Name of a table in the data store.
pub type TableName = String;
Expand Down

0 comments on commit 1d9bf56

Please sign in to comment.