MONGOC_CLIENT_POOL_MIN_SIZE(3)
π MONGOC_CLIENT_POOL_MIN_SIZE π
okay bestie, we're in the libmongoc era and today's main character is mongoc_client_pool_min_size β a little function that, no cap, is deprecated. sit with me, this one's a whole saga. π«Ά
π¨ WARNING (read this first, fr fr) π¨
Deprecated since version 1.9.0. This function is deprecated because its behavior does not match what developers expect from a "minimum pool size", and its actual behavior is likely to hurt performance. π
Applications should not call this function. Instead, they should just accept the default behavior, which is to keep all idle clients that are pushed into the pool. periodt. β¨
β¨ SYNOPSIS β¨
void
mongoc_client_pool_min_size (mongoc_client_pool_t *pool,
uint32_t min_pool_size);
So here's the tea: this function actually sets the maximum number of idle clients to be kept in the pool. Any idle clients in excess of the maximum are destroyed. yes, you read that right β it's giving "minimum" but it's lowkey doing "maximum" energy, and that's exactly why it got deprecated. π
πΈ PARAMETERS πΈ
poolβ Amongoc_client_pool_t. the pool in question, the whole vibe. π¦min_pool_sizeβ The number of idle clients to keep in the pool. β
π§ THREAD SAFETY π§
This function is safe to call from multiple threads. slay. π
Subsequent calls to mongoc_client_pool_push() respect the new minimum size, and close the least recently used mongoc_client_t if the minimum size is exceeded. so like, LRU girlies get evicted first β iykyk. π
π AUTHOR π
MongoDB, Inc
π COPYRIGHT π
2009-present, MongoDB, Inc.
and that's the whole page, bestie β no notes, we ate. π β¨
signing off from libmongoc version 1.30.13, dated Oct 09, 2026 β mwah, take care of yourselves and please don't call the deprecated function ππ¦
π¦ where this page comes from
- fedora 43: mongo-c-driver-devel 1.30.13-1.fc43 Β· Apache-2.0 AND ISC AND MIT AND Zlib
- fedora 43: mongo-c-driver-devel 1.30.13-1.fc43 Β· Apache-2.0 AND ISC AND MIT AND Zlib
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms