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 < 0 indicates that a is less than b.
  • A result of 0 indicates that the values of a and b are identical.
  • A result of > 0 indicates that a is greater than b.

πŸ¦‹ 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