sds_bptree_transaction(3)

sds_bptree_transaction(3) πŸ’–

okay bestie, welcome to the Library Functions Manual entry for sds_bptree_transaction(3). Buckle up for struct lore, fields, and zero skipped details. πŸŽ€

✨ NAME ✨

sds_bptree_transaction β€” that's the name, and honestly it's giving main character energy already. πŸ’…

🌸 SYNOPSIS 🌸

#include <sds.h>

πŸŽ€ Data Fields πŸŽ€

  • uint32_t checksum
  • uint32_t reference_count
  • sds_txn_state state
  • struct _sds_bptree_cow_instance * binst
  • struct _sds_bptree_instance * bi
  • uint64_t txn_id
  • sds_bptree_node_list * owned
  • sds_bptree_node_list * created
  • struct _sds_bptree_node * root
  • struct _sds_bptree_transaction * parent_txn
  • struct _sds_bptree_transaction * child_txn

πŸ’… Detailed Description πŸ’…

Okay so sds_bptree_transaction manages the content and lifetime of nodes within the tree. It is literally the basis of our garbage collection system, using atomic reference counts to synchronise our behaviour. iconic. ✨

πŸ¦‹ Field Documentation πŸ¦‹

Each field gets its moment, bestie. No skipping the lore. πŸ’–

struct _sds_bptree_instance* sds_bptree_transaction::bi

Pointer to the b+tree instance that this transaction holds. 🫢

struct _sds_bptree_cow_instance* sds_bptree_transaction::binst

Pointer to the cow b+tree instance that created us. Lowkey origin story. πŸ„

uint32_t sds_bptree_transaction::checksum

Checksum of the data in this structure. πŸ’…

struct _sds_bptree_transaction* sds_bptree_transaction::child_txn

The next transaction that derives from us. It's giving lineage. 🌱

sds_bptree_node_list* sds_bptree_transaction::created

The list of nodes that this transaction "created". This is used during an abort of the txn to roll back any changes that we made. So if we abort, this list is the undo button. 😭

sds_bptree_node_list* sds_bptree_transaction::owned

The list of nodes that this transaction "owns". When the reference count moves to 0, these nodes will be freed. This list is created during a write transaction of the "items that will not be needed when we are removed." kind.

IE, when we have a txn A, then a new transaction B is made, we "copy" node 1a to node 1b. Node 1b is "created" by txn B, and node 1a is "owend" by txn A, because it's the last transaction that depends on this nodes existance. πŸ“

struct _sds_bptree_transaction* sds_bptree_transaction::parent_txn

The previous transaction that we are derived from. Family tree behaviour. 🌳

uint32_t sds_bptree_transaction::reference_count

Reference count to the number of consumers of this transaction. This is atomically updated. If this is the "active" primary transaction, this is guaranteed to be 1 or greater. When a new write transaction is commited, if this reference count falls to 0, this transaction is implicitly destroy. πŸ’€

struct _sds_bptree_node* sds_bptree_transaction::root

The current root node. Each transaction owns a unique root node which anchors the branches of the copy on write structure. 🌈

sds_txn_state sds_bptree_transaction::state

The state of the transaction. All transactions start as SDS_WRITE_TXN, and upon commit move to the SDS_READ_TXN state. πŸ‘‘

uint64_t sds_bptree_transaction::txn_id

The unique identifier of this transaction. Your fave's little ID badge. πŸŽ€

🌟 Author 🌟

Generated automatically by Doxygen for dirsrv from the source code. Doxygen ate, no cap. πŸ’…


Sign-off: source is dirsrv, Version 3.3.0, page is sds_bptree_transaction(3) β€” and the date? Not in the footer, so I'm not inventing one. We respect lore accuracy in this group chat. Mwah πŸ’‹

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