MONGOC_BULK_OPERATION_SET_HINT(3)
π MONGOC_BULK_OPERATION_SET_HINT π
okay bestie, welcome to the libmongoc manual, section 3 β this one's a lil vintage, a lil deprecated, and we're gonna get through it together π«Ά
π¨ WARNING π¨
Deprecated since version 1.28.0 β girl, she's retired. Use mongoc_bulk_operation_set_server_id() instead. no cap. π
β¨ SYNOPSIS β¨
void
mongoc_bulk_operation_set_hint (mongoc_bulk_operation_t *bulk, uint32_t server_id);
that's the whole vibe right there β¬οΈ
π PARAMETERS π
bulkβ amongoc_bulk_operation_t. that's the thing you're operating on, your main character π«Άserver_idβ an opaque id that identifies which server to use. opaque meaning you don't peek inside it, you just hold it and pass it along, iykyk πΈ
π DESCRIPTION π
So basically, this function tells the driver which server to use for the operation. that's it, that's the job β¨
β οΈ it only does anything if you call it before mongoc_bulk_operation_execute(). call it after and it's giving nothing, literally nothing, the window has closed π
now, about the name β the function name still has the old term "hint" in it purely for the sake of backward compatibility. the way that we now call this number a "server id". same number, new glow-up. it's iconic honestly π
and here's the part you actually need to hear: use mongoc_bulk_operation_set_hint only for building a language driver that wraps the C Driver. that's the whole audience, that's the whole point of her π§
if you're writing applications in C? leave the server id unset, bestie. just let the driver choose a suitable server for the bulk operation. she knows what she's doing, trust her π
π AUTHOR π
MongoDB, Inc
π COPYRIGHT π
2009-present, MongoDB, Inc.
and that's the page, babe π this was libmongoc version 1.30.13, dated Oct 09, 2026 β thanks for reading, go forth and let the driver pick your server for you π¦β¨
π¦ 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