Expand description
Internal component of the
noxudatabase.This crate is published only so the
noxuumbrella crate can depend on it. Usenoxu(noxu = "7") in applications; depend on this crate directly only if you are extending the engine internals. Its API may change without a major version bump.
B-tree implementation for Noxu DB.
the main in-memory cache containing persistent B-tree nodes (IN, BIN, LN) and access methods.
§Module Structure
error- Tree error typesentry_states- Slot state bit flags (KD, PD, dirty, embedded)key- Key comparison and prefix utilitiesnode- Base node types and ID generationchild_reference- Reference from parent to child nodein_node- Internal Node (core B-tree node)ln- Leaf Node (data records)tree- B+tree operations (search, insert, split)
§Architecture
The tree is structured as a B+tree with:
- Internal Nodes (IN) at higher levels
- Bottom Internal Nodes (BIN) at the leaf level
- Leaf Nodes (LN) containing actual data
The tree uses latch-coupling for concurrent access and supports splits, compression, and efficient caching.
Re-exports§
pub use error::TreeError;pub use ln::Ln;pub use tree::InListListener;pub use file_summary_ln::FileSummary;pub use file_summary_ln::FileSummaryLn;pub use map_ln::MapLn;pub use name_ln::NameLn;pub use uncached_ln::make_uncached_ln;pub use uncached_ln::make_uncached_ln_from_bytes;pub use versioned_ln::make_versioned_ln;pub use tree::BinEntry;pub use tree::BinStub;pub use tree::ChildArc;pub use tree::InEntry;pub use tree::InNodeStub;pub use tree::InRedoResult;pub use tree::KeyComparatorFn;pub use tree::KeyRep;pub use tree::LsnRep;pub use tree::SlotFetch;pub use tree::TargetRep;pub use tree::Tree;pub use tree::TreeNode;pub use tree::TreeStats;pub use tree::generate_node_id;pub use tree::peek_next_node_id_counter;pub use tree::seed_node_id_counter;pub use tree::BIN_LEVEL;pub use tree::DBMAP_LEVEL;pub use tree::EXACT_MATCH;pub use tree::INSERT_SUCCESS;pub use tree::LEVEL_MASK;pub use tree::MAIN_LEVEL;pub use tree::MIN_LEVEL;pub use child_reference::ChildReference;pub use entry_states::SlotState;pub use key::KeyComparator;pub use node::NULL_NODE_ID;pub use node::NodeType;pub use search_result::SearchResult;pub use tree_location::TreeLocation;
Modules§
- child_
reference - Reference from parent to child in the B-tree.
- delta_
info - BIN delta slot information.
- entry_
states - Slot state bit flags for BIN entries.
- error
- Error types for the noxu-tree crate.
- file_
summary_ ln - FileSummaryLN - Leaf Node for per-file utilization tracking.
- key
- Key comparison and prefix utilities.
- ln
- Leaf Node (LN) implementation.
- map_ln
- MapLN - Leaf Node that maps database IDs to database metadata.
- name_ln
- NameLN - Leaf Node that maps database names to database IDs.
- node
- Base node types and identifiers for the B-tree.
- search_
result - Tree search result structure.
- tracking_
info - Tracking information for cleaner and log management.
- tree
- B+tree implementation.
- tree_
location - Recovery cursor-like position tracker.
- tree_
utils - Small utility functions for tree operations.
- uncached_
ln - UncachedLN - LN variant that avoids data copy when not cached.
- versioned_
ln - Versioned LN - LN that preserves VLSN information.
Type Aliases§
- Node
RwLock - A reader-writer lock