Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Gifted-s/velarixdb
/ functions
Functions
380 in github.com/Gifted-s/velarixdb
⨍
Functions
380
◇
Types & classes
79
↓ 137 callers
Method
clone
(&self)
src/filter/bf.rs:243
↓ 104 callers
Method
write
Writes filter metadata to disk Writes filter to disk, note, this does not include the `bit_vec``, bit vec re-computed during crash recovery # Errors
src/filter/bf.rs:114
↓ 85 callers
Method
insert
Inserts an entry to the `MemTable`
src/memtable/mem.rs:207
↓ 57 callers
Method
get
Reteives an entry from the [`DataStore`] This is user facing and its asyncronous # Examples ```rust # use tempfile::tempdir; use velarixdb::db::Da
src/db/store.rs:442
↓ 43 callers
Method
put
Inserts a new entry into the store # Examples ``` # use tempfile::tempdir; use velarixdb::db::DataStore; #[tokio::main] async fn main() { let root =
src/db/store.rs:215
↓ 30 callers
Method
set
Adds key to filter
src/filter/bf.rs:84
↓ 25 callers
Function
create_datastore
()
src/cfg/config.rs:241
↓ 23 callers
Method
is_empty
(&self)
src/fs/mod.rs:92
↓ 21 callers
Method
load_entries_from_file
Build `entries` from sstable data file # Errors Returns IO error incase it occurs
src/sst/table.rs:200
↓ 17 callers
Method
append
Appends new entry to value log Returns start offset of the newly inserted entry
src/vlog/v_log.rs:173
↓ 16 callers
Method
as_bytes
(&self, value: usize)
src/db/store.rs:115
↓ 14 callers
Method
build_filter_from_entries
Reconstructs `bit_vec`` from entries
src/filter/bf.rs:126
↓ 14 callers
Method
clear
Resets the [`BloomFilter`] instance
src/filter/bf.rs:180
↓ 13 callers
Method
contains
Checks if a key exists or not
src/filter/bf.rs:95
↓ 13 callers
Method
set_head
Sets `head_offset` of `ValueLog`
src/vlog/v_log.rs:260
↓ 12 callers
Method
recover_meta
Retrieves filter meta data from disk # Errors Returns IO error in case recovery fails
src/filter/bf.rs:135
↓ 12 callers
Function
setup
()
src/tests/store_test.rs:12
↓ 10 callers
Method
get
Returns value for an entry or `None`
src/memtable/mem.rs:223
↓ 10 callers
Function
milliseconds_to_datetime
Converts milliseconds to `DateTime<Utc>`
src/util/mod.rs:20
↓ 10 callers
Method
set_tail
Sets `tail_offset` of `ValueLog`
src/vlog/v_log.rs:265
↓ 9 callers
Function
default_datetime
Returns lowest possible `DateTime<Utc>`
src/util/mod.rs:27
↓ 9 callers
Method
tombstone_check
Checks if an entry has been deleted or not Deleted entries are discoverd using the tombstones hashmap and prevented from being inserted Returns true
src/compactors/sized.rs:290
↓ 8 callers
Method
filter_sstables_by_key_range
Returns `Table` vector whose last key is greater than the supplied key parameter # Errors Returns error in case failure occured
src/key_range/range.rs:91
↓ 8 callers
Method
seek
(&self, start_offset: u64)
src/fs/mod.rs:244
↓ 7 callers
Method
generate_workload_data_as_vec
(&self)
src/tests/workload.rs:69
↓ 7 callers
Function
setup
( store: Arc<RwLock<DataStore<'static, Key>>>, workload: &crate::tests::workload::Workload,
src/tests/gc_test.rs:12
↓ 7 callers
Method
size
(&self)
src/sst/table.rs:118
↓ 6 callers
Method
clone
(&self)
src/compactors/compact.rs:145
↓ 6 callers
Method
delete
Removes an entry from the store # Examples ``` # use tempfile::tempdir; use velarixdb::db::DataStore; #[tokio::main] async fn main() { let root =
src/db/store.rs:351
↓ 6 callers
Method
extract_imbalanced_buckets
Returns imbalanced [`Bucket`] and sstables to remove from that bucket for compaction # Errors Returns error in case there in IO error or any kind of
src/bucket/bucket_manager.rs:270
↓ 6 callers
Function
generate_random_id
(length: usize)
src/util/mod.rs:9
↓ 6 callers
Method
set_entry
Sets an entry with the provided key and value offset in the Block. Returns an `Result` indicating success or failure. # Errors Returns error if the
src/block/block_manager.rs:112
↓ 6 callers
Method
w_lock
(&self)
src/fs/mod.rs:253
↓ 6 callers
Method
write_all
(&self, buf: &Buf)
src/fs/mod.rs:218
↓ 5 callers
Function
generate_config
()
src/tests/sized_tier_test.rs:16
↓ 5 callers
Method
insert_parallel
( &self, entries: &[Entry], store: Arc<RwLock<DataStore<'static, Key>>>, )
src/tests/workload.rs:90
↓ 5 callers
Method
insert_to_appropriate_bucket
Inserts merged sstable or memtable to a bucket Tables to be inserted to bucket must have the `InsertableToBucket` trait Returns Result `Table` or `E
src/bucket/bucket_manager.rs:200
↓ 4 callers
Method
fits_into_bucket
Checks if a table will fit into a `Bucket` To understand how we arrived at these conditions you can read about Sized Tier Compaction (STCS) from: - O
src/bucket/bucket_manager.rs:137
↓ 4 callers
Method
get_entries
(&self)
src/compactors/insertor.rs:15
↓ 4 callers
Method
get_value_from_vlog
Retrieves value from Value Log Returns value from value log using the provided offset # Errors Returns error, if an IO error occurs or key was not
src/db/store.rs:628
↓ 4 callers
Method
has_expired
(&self, ttl: std::time::Duration)
src/memtable/mem.rs:149
↓ 4 callers
Method
is_balanced
Checks if a [`Bucket`] is balanced
src/bucket/bucket_manager.rs:292
↓ 4 callers
Method
is_full
Returns `true` if `Memtable` is full
src/memtable/mem.rs:277
↓ 4 callers
Method
recover
Recovers `Summary` fields from summary file # Errors Returns IO error in case it occurs
src/sst/table.rs:420
↓ 4 callers
Method
run_compaction
Trigger compaction mannually # Errors Returns error, if trigger failed
src/db/store.rs:720
↓ 4 callers
Method
serialize
Serializes `Summary` to byte vector
src/sst/table.rs:428
↓ 4 callers
Method
validate_size
Validate key and value sizes. Key size can be up to 65536 bytes in size, and value size can be up to 2^32 bytes, key cannot be zero length and value(
src/db/store.rs:547
↓ 3 callers
Method
capacity
Returns the capacity of the `MemTable`
src/memtable/mem.rs:313
↓ 3 callers
Method
check_restored_key_ranges
Returns `Table` vector whose last key is greater than or equal to the supplied key parameter NOTE: The search is carried out on sstables whose filter
src/key_range/range.rs:164
↓ 3 callers
Function
float_from_le_bytes
Converts bytes slice to float
src/util/mod.rs:42
↓ 3 callers
Method
flush
Handles a single flush operation This method writes memtable to the right bucket and update the `KeyRange` with the new sstable
src/flush/flusher.rs:37
↓ 3 callers
Method
force_flush
(&mut self)
src/db/store.rs:651
↓ 3 callers
Method
generate_workload_data_as_map
(&self)
src/tests/workload.rs:50
↓ 3 callers
Method
get
Retrieves key (searches GC Table first, then SSTables next) Returns tuple of value and date created # Errors Returns error in case search was not s
src/gc/garbage_collector.rs:429
↓ 3 callers
Method
increment_ptr1
(&mut self)
src/compactors/compact.rs:127
↓ 3 callers
Method
increment_ptr2
(&mut self)
src/compactors/compact.rs:130
↓ 3 callers
Method
metadata
(&self)
src/fs/mod.rs:198
↓ 3 callers
Method
remove
Removes an entry from the `key_ranges` hash map
src/key_range/range.rs:81
↓ 3 callers
Method
update
Updates an entry in `entries` map # Error Returns error if key was not found
src/memtable/mem.rs:238
↓ 3 callers
Method
update
Removes an entry from the store # Examples ``` # use tempfile::tempdir; use velarixdb::db::DataStore; #[tokio::main] async fn main() { let root = te
src/db/store.rs:528
↓ 3 callers
Method
with_allow_prefetch
Enables or disables prefetching.
src/cfg/config.rs:109
↓ 3 callers
Method
with_enable_ttl
Enables or disables TTL (Time-To-Live) for entries.
src/cfg/config.rs:145
↓ 2 callers
Method
calculate_hash
Generates the hashed version of a provided key
src/filter/bf.rs:222
↓ 2 callers
Method
clean_up_after_compaction
Removes sstables that are already merged to form larger table(s) NOTE: This should only be called if merged sstables have been written to disk otherw
src/compactors/sized.rs:144
↓ 2 callers
Method
delete
Inserts an entry with tombstone to `entries` map # Errors Returns error if key was not found
src/memtable/mem.rs:266
↓ 2 callers
Method
delete_ssts
Deletes SSTables files Returns true or false based on deletion success or failure NOTE: This should be called only after compaction is complete Erro
src/bucket/bucket_manager.rs:308
↓ 2 callers
Function
float_to_le_bytes
Converts float to bytes slice
src/util/mod.rs:32
↓ 2 callers
Method
found_in_table
Checks if insert time is greater than the least possible insert time meaning the key was found
src/db/store.rs:616
↓ 2 callers
Method
get_entry
(&self, key: impl AsRef<[u8]>)
src/block/block_manager.rs:200
↓ 2 callers
Method
insert_to_bucket
Determines which bucket to insert merged sstable or memtable based on `InsertionType` Returns Result `Table` or `Err` # Errors Returns error in cas
src/bucket/bucket_manager.rs:223
↓ 2 callers
Method
is_full
Checks if the Block is full
src/block/block_manager.rs:159
↓ 2 callers
Method
mark_readonly
Seals Memtable as read-only
src/memtable/mem.rs:282
↓ 2 callers
Method
merge_ssts_in_buckets
Merges the sstables in each `Bucket` to form a larger one Returns `Result` with merged sstable or error # Errors Returns error incase an error occu
src/compactors/sized.rs:170
↓ 2 callers
Method
read_chunk_to_garbage_collect
Returns entries within `gc_chunk_size` to garbage collection # Errors Returns error in case there is an IO error
src/vlog/v_log.rs:237
↓ 2 callers
Method
seek
TODO: range query, add next and previous method
src/range/range_iterator.rs:49
↓ 2 callers
Method
serialize
Serializes the entry in the block to a byte vector Returns `Ok(entry_vec)` or Error if serialization failed
src/block/block_manager.rs:176
↓ 2 callers
Method
update_key_range
Moves entries in `restored_ranges` with sstables whose filters are just restored to `key_ranges`
src/key_range/range.rs:181
↓ 2 callers
Method
update_last_modified
Updates `last_modified` field
src/meta/meta_manager.rs:73
↓ 2 callers
Method
with_background_compaction_interval
Sets the interval for background compaction. The interval must be at least 5 minutes to prevent overloads.
src/cfg/config.rs:185
↓ 2 callers
Method
with_compactor_flush_listener_interval
Sets the interval for compactor flush listener. The interval must be at least 2 minutes to prevent overloading the system.
src/cfg/config.rs:174
↓ 2 callers
Method
with_entry_ttl
Sets the TTL for entries if TTL is enabled. The TTL must be at least 3 days if enable_ttl is set to true.
src/cfg/config.rs:152
↓ 2 callers
Method
with_false_positive_rate
Sets the false positive rate for the DataStore. The rate must be greater than 0.0.
src/cfg/config.rs:102
↓ 2 callers
Method
with_gc_chunk_size
Sets the with_gc_chunk_size in kilobytes i.e offsets in vlog file to scan for garbage collection. The size must be at least 50 kilobytes.
src/cfg/config.rs:225
↓ 2 callers
Method
with_max_buffer_write_number
Sets the maximum number of buffer writes. The number must be greater than 0.
src/cfg/config.rs:138
↓ 2 callers
Method
with_online_gc_interval
Sets the interval for online garbage collection. The interval must be at least 1 hour.
src/cfg/config.rs:213
↓ 2 callers
Method
with_prefetch_size
Sets the prefetch size if prefetching is allowed. The size must be greater than 0 if allow_prefetch is set to true.
src/cfg/config.rs:116
↓ 2 callers
Method
with_tombstone_compaction_interval
Sets the interval for tombstone compaction. The interval must be at least 10 days.
src/cfg/config.rs:196
↓ 2 callers
Method
with_tombstone_ttl
Sets the TTL for tombstones. The TTL must be at least 10 days to prevent resurrecting entries marked deleted.
src/cfg/config.rs:163
↓ 2 callers
Method
with_write_buffer_size
Sets the write buffer size in kilobytes. The size must be at least 50 kilobytes.
src/cfg/config.rs:127
↓ 2 callers
Method
write_block
Write block to disk Errors Returns error in case of IO error
src/sst/table.rs:333
↓ 2 callers
Method
write_to_file
Writes entries in the block to the sstable file Returns a `Result` indicating success or failure. # Errors Returns an error if write fails
src/block/block_manager.rs:148
↓ 1 callers
Method
clear
Clears all key-value entries in the MemTable.
src/memtable/mem.rs:325
↓ 1 callers
Method
clear_all
CAUTION: This deletes the value log file
src/vlog/v_log.rs:248
↓ 1 callers
Method
extract_sstables
Returns SSTables that needs to be compacted in a [`Bucket`] If sstables in bucket exceeds `MAX_TRESHOLD` then only returns the MAX_TRESHOLD otherwise
src/bucket/bucket_manager.rs:156
↓ 1 callers
Method
false_positive_rate
Sets false positive rate for `MemTable`
src/memtable/mem.rs:299
↓ 1 callers
Method
find_entry
( &self, offset: u32, searched_key: &[u8], )
src/fs/mod.rs:334
↓ 1 callers
Method
flush_handler
Flushes memtable to disk in background Handles flushing memtable to disk in background and removes it from the read only memtables It also notifies
src/flush/flusher.rs:72
↓ 1 callers
Method
flush_read_only_memtables
Flushes read-only memtable to disk using a background tokio task
src/db/store.rs:359
↓ 1 callers
Method
free_unused_space
for non-linux environment Frees unused space on the disk Returns new head and new tail in case of success # Errors Returns error in case of IO erro
src/gc/garbage_collector.rs:327
↓ 1 callers
Method
get_entries
(&self)
src/sst/table.rs:114
next →
1–100 of 380, ranked by callers