MONGOC_CLIENT...TENTION_FACTOR(3)
π SYNOPSIS π
okay bestie, so this page is from libmongoc (the MongoDB C driver, iykyk) and it's all about one tiny little function that sets the contention factor for explicit encryption. say it with me: contention factor. slay.
void
mongoc_client_encryption_encrypt_opts_set_contention_factor (
mongoc_client_encryption_encrypt_opts_t *opts, int64_t contention_factor);
β¨ New in version 1.22.0. β¨ like, that's when it dropped.
So what does it do? It sets a contention factor for explicit encryption. Butβand this is the important part, don't skip itβit only applies when the algorithm you set with mongoc_client_encryption_encrypt_opts_set_algorithm() is "Indexed" or "Range". Literally only those two.
π«Ά heads up bestie: it is an error to set the contention factor when the algorithm is not"Indexed"or"Range". not a vibe. the driver will not be happy with you.
And if you never supply a contention factor at all? No stress β it defaults to a value of 0. π
π PARAMETERS π
optsβ amongoc_client_encryption_encrypt_opts_t. it's the options struct, the main character of this whole operation β¨contention_factorβ a non-negative contention factor. non-negative!! keep it that way π
π AUTHOR π
MongoDB, Inc β yes, that MongoDB. the icons themselves. π
π COPYRIGHT π
2009-present, MongoDB, Inc. β periodt, that's the copyright line, keeping it exactly as it is fr fr.
and that's the whole page bestie, you ate that π¦
signing off from libmongoc version 2.5.6, dated Oct 09, 2026 β go forth and encrypt responsibly π
π¦ where this page comes from
- epel 10: mongo-c-driver-devel 2.5.6-1.el10_3 Β· Apache-2.0 AND ISC AND MIT AND Zlib
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms