sds_bptree_instance(3)
πΈ NAME πΈ
okay bestie, welcome to sds_bptree_instance(3) β the Library Functions Manual page for sds_bptree_instance. Itβs giving βthe B+Tree instance struct,β and weβre gonna go through every single field, no cap. π
β¨ SYNOPSIS β¨
#include <sds.h>
π Data Fields π
uint32_t checksum
uint16_t offline_checksumming
uint16_t search_checksumming
uint16_t print_iter
sds_bptree_node * root
void(* value_free_fn )(void *value)
void *(* value_dup_fn )(void *value)
int64_t(* key_cmp_fn )(void *a, void *b)
void(* key_free_fn )(void *key)
void *(* key_dup_fn )(void *key)
π Detailed Description π
This is the instance of the B+Tree. It stores references to function pointers for manipulation of keys and values within the tree. It also maintains the root checksum, which establishes the βroot of trustβ to all other nodes in the tree. π«Ά
π Field Documentation π
π
uint32_t sds_bptree_instance::checksum
Checksum of the instance data. Literally the vibe check for the instance itself. β¨
πΈ int64_t(* sds_bptree_instance::key_cmp_fn) (void *a, void *b)
Key comparison function. This must return an int64_t of the difference in the values.
- A result of
< 0indicates thatais less thanb. - A result of
0indicates that the values ofaandbare identical. - A result of
> 0indicates thatais greater thanb.
π¦ void *(* sds_bptree_instance::key_dup_fn) (void *key)
Key duplication function. This duplicates the value of key and returns a new pointer to it.
bestie, this is used extensively in the tree structure, and the key or result may be freed out of order β so donβt blindly return the same data. π
π void(* sds_bptree_instance::key_free_fn) (void *key)
Key free function. This must free the pointer provided by key. π§
β uint16_t sds_bptree_instance::offline_checksumming
This flag determines if we maintain and update checksum values during tree operations, and that we verify these during the verification operation. π
π uint16_t sds_bptree_instance::print_iter
Internal tracking id for tree display. Itβs the little backstage pass for showing the tree. ποΈ
π sds_bptree_node* sds_bptree_instance::root
Pointer to the current tree root node. The main character of the tree, fr fr. π³
π₯ uint16_t sds_bptree_instance::search_checksumming
This flag determines if we verify all checksums during the read and write paths of the code.
Adds a large performance overhead, but guarantees the data in the tree is βconsistentβ. So yeah β expensive, but iconic for safety. πβ¨
π void *(* sds_bptree_instance::value_dup_fn) (void *value)
This function should be able to duplicate value of the type that will be inserted into the tree.
Values may be freed and duplicated in an order you do not expect, so blindly returning a pointer to the same data may not be wise if free then destroys it. iykyk. π
π§ void(* sds_bptree_instance::value_free_fn) (void *value)
This function should be able to free values of the type that will be inserted into the tree. π«Ά
π Author π
Generated automatically by Doxygen for dirsrv from the source code.
okay thatβs the whole page, bestie π
β source/version at the bottom: dirsrv, Version 3.3.0. The footer doesnβt show a separate date, so Iβm not inventing one. periodt. π«Άβ¨
π¦ where this page comes from
- centos-stream 10: 389-ds-base-devel 3.3.0-4.el10 Β· GPL-3.0-or-later WITH GPL-3.0-389-ds-base-exception AND (Apache-2.0 OR Apache-2.0 WITH LLVM-exception OR MIT) AND (Apache-2.0 OR LGPL-2.1-or-later OR MIT) AND (Apache-2.0 OR MIT) AND (MIT OR Apache-2.0) AND Unicode-3.0 AND (MIT OR Unlicense) AND Apache-2.0 AND MIT AND MPL-2.0 AND Zlib
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms