MONGOC_WRITE_...WTIMEOUT_INT64(3)

πŸ’… MONGOC_WRITE_...WTIMEOUT_INT64 πŸ’…

okay bestie, so this one's from libmongoc (the MongoDB C driver, you know the vibe) and it's genuinely so simple you're gonna slay it ✨


πŸ’– SYNOPSIS πŸ’–

void
mongoc_write_concern_set_wtimeout_int64 (mongoc_write_concern_t *write_concern,
                                         int64_t wtimeout_msec);

that's the whole thing. one function, two args, void return like the low-maintenance icon it is πŸŽ€


πŸ¦‹ PARAMETERS πŸ¦‹

  • write_concern β€” a mongoc_write_concern_t. literally the write concern struct you're about to mess with, no cap.
  • wtimeout_msec β€” a positive int64_t, or zero. that's it, that's the range. zero is allowed and it means something (see below, keep reading πŸ‘€).

✨ DESCRIPTION ✨

so what does this actually do? it sets the timeout, in milliseconds, that the server should wait before it comes back at you with a write concern timeout. key detail bestie: this is not the same as a socket timeout, like not even close, don't confuse them πŸ™ˆ

and if you pass a value of zero, that's the way you say "no write concern timeout at all, we're chilling" πŸ’…

history moment 🧚 beginning in version 1.9.0, this function can alter the write concern after it's already been used in an operation. before that? using the struct with an operation would mark it as "frozen" 🧊 and calling this function would log a warning instead instead of altering the write concern. so yeah, glow-up achieved, the frozen era is over πŸ‘‘

πŸ‘€ SEE ALSO πŸ‘€

  • mongoc_write_concern_get_wtimeout_int64() β€” the getter, the other half of the duo, go read it too 🫢

🌈 AUTHOR 🌈

MongoDB, Inc β€” they wrote it, they get the credit, we stan 🫢


2009-present, MongoDB, Inc. β€” iconic run honestly, twenty-plus years of main character energy πŸ‘‘


k that's the whole page bestie, go forth and set those write concern timeouts responsibly πŸ’–βœ¨

libmongoc 2.5.6, dated Oct 09, 2026 β€” mwah, see u in the next manpage πŸ’‹

πŸ“¦ where this page comes from