Skip to content

Commit

Permalink
Rework of tuplebox storage layer
Browse files Browse the repository at this point in the history
  * Add a mmap-anon bufferpool implementation & a slots/heap implementation for dynamically sized items, to explicitly manage tuple storage better.
  * Rework tuple storage generally to reduce copies.
  * Add a `predicate_scan` function to support the ability to seek items by predicate out of the whole relation. Will be used by e.g. the connections db.
  • Loading branch information
rdaum committed Oct 31, 2023
1 parent 69d12f9 commit 8eac4f3
Show file tree
Hide file tree
Showing 38 changed files with 2,810 additions and 803 deletions.
140 changes: 121 additions & 19 deletions Cargo.lock

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

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ metrics-util = { version = "0.15.1", default-features = false, features = ["rec
metrics-macros = "0.7.0"

# General usefullness
atomic-wait = "1.1.0"
binary-layout = "3.2.0"
bytes = "1.5.0"
chrono = "0.4.31"
Expand All @@ -67,6 +68,7 @@ sized-chunks = "0.7.0"
strum = { version = "0.25.0", features = ["derive"] }
uuid = { version = "1.4.1", features = ["v4"] }
yoke = "0.7.2"
yoke-derive = "0.7.2"

## Required for MOO builtins.
pwhash = "1.0.0" # For MOO's hokey "crypt" function, which is unix's crypt(3) basically
Expand All @@ -92,6 +94,7 @@ bincode = "2.0.0-rc.3" # For serializing/deserializing values
im = "15.1.0" # Immutable data structures
rocksdb = "0.21.0"
text_io = "0.1.12" # Used for reading text dumps.
libc = "0.2.149"

# Dev dependencies
tempfile = "3.8.0"
Expand Down
5 changes: 4 additions & 1 deletion crates/db/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ repository.workspace = true

[dev-dependencies]
tempfile.workspace = true
rand.workspace = true

[dependencies]
## Own
Expand Down Expand Up @@ -36,4 +37,6 @@ crossbeam-channel.workspace = true
bincode.workspace = true
im.workspace = true
sized-chunks.workspace = true

binary-layout.workspace = true
libc.workspace = true
atomic-wait = "1.1.0"
2 changes: 1 addition & 1 deletion crates/db/src/channel_db_tx_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ use moor_values::model::propdef::{PropDef, PropDefs};
use moor_values::model::props::PropFlag;
use moor_values::model::r#match::VerbArgsSpec;
use moor_values::model::verbdef::VerbDef;
use moor_values::model::verbdef::VerbDefs;
use moor_values::model::verbs::{BinaryType, VerbAttrs, VerbFlag};
use moor_values::model::{CommitResult, WorldStateError};
use moor_values::util::bitenum::BitEnum;
Expand All @@ -17,7 +18,6 @@ use moor_values::var::Var;

use crate::db_message::DbMessage;
use crate::db_tx::DbTransaction;
use moor_values::model::verbdef::VerbDefs;

pub(crate) struct DbTxChannelClient {
pub(crate) mailbox: Sender<DbMessage>,
Expand Down
3 changes: 1 addition & 2 deletions crates/db/src/db_message.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,14 @@ use moor_values::model::propdef::{PropDef, PropDefs};
use moor_values::model::props::PropFlag;
use moor_values::model::r#match::VerbArgsSpec;
use moor_values::model::verbdef::VerbDef;
use moor_values::model::verbdef::VerbDefs;
use moor_values::model::verbs::{BinaryType, VerbFlag};
use moor_values::model::CommitResult;
use moor_values::model::WorldStateError;
use moor_values::util::bitenum::BitEnum;
use moor_values::var::objid::Objid;
use moor_values::var::Var;

use moor_values::model::verbdef::VerbDefs;

/// The set of messages that DbTxWorldState sends to the underlying physical database to execute
/// storage/retrieval of object attributes, properties, and verbs.
pub(crate) enum DbMessage {
Expand Down
Loading

0 comments on commit 8eac4f3

Please sign in to comment.