Skip to main content

Crate noxu_tree

Crate noxu_tree 

Source
Expand description

Internal component of the noxu database.

This crate is published only so the noxu umbrella crate can depend on it. Use noxu (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 types
  • entry_states - Slot state bit flags (KD, PD, dirty, embedded)
  • key - Key comparison and prefix utilities
  • node - Base node types and ID generation
  • child_reference - Reference from parent to child node
  • in_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§

NodeRwLock
A reader-writer lock