MONGOC_WRITE_CONCERN_SET_FSYNC(3)

πŸ’– MONGOC_WRITE_CONCERN_SET_FSYNC πŸ’–

okay bestie, so we're in the libmongoc manual, page MONGOC_WRITE_CONCERN_SET_FSYNC(3) β€” yes it's a mouthful, yes it's iconic, and yes we're gonna get through it together. sit down, grab a lil drink, this one's short but it has lore. 🫢


🚨 WARNING 🚨

Deprecated since version 1.4.0. bestie. i'm so serious. use mongoc_write_concern_set_journal() instead. this function is giving "still in my phone as an ex" energy. πŸ’€

✨ SYNOPSIS ✨

void
mongoc_write_concern_set_fsync (mongoc_write_concern_t *write_concern,
                                bool fsync_);

that's it. that's the whole signature. two args, one void, zero drama. 😌


πŸŽ€ PARAMETERS πŸŽ€

  • write_concern β€” a mongoc_write_concern_t. yes queen, this is the struct we're messing with.
  • fsync_ β€” a boolean. literally just true or false, no in-between, no "it's complicated". 🌸

πŸ¦‹ DESCRIPTION πŸ¦‹

so what does this bad boy actually do? it sets whether a fsync must be performed before we go ahead and indicate that the write was successful. like, are we making sure it's actually on disk before we start celebrating? that's the vibe. ✨

and here's the glow-up moment: beginning in version 1.9.0, this function can now alter the write concern after it's already been used in an operation. like, it got a whole personality update. πŸ’…

before that, the lore was rougher: using the struct with an operation would mark it as "frozen" ❄️ β€” and if you called this function anyway, it would just log a warning instead of actually altering the write concern. no changes, just a lil "girl what are you doing" in your logs. πŸ™ˆ

tl;dr β€” old versions: frozen struct, warning only. 1.9.0 and up: it actually works. periodt.

πŸ‘‘ AUTHOR πŸ‘‘

MongoDB, Inc β€” the icons themselves. 🫢


2009-present, MongoDB, Inc. β€” protecting the brand since forever, no cap.


and that's the whole page, bestie!! you understood it, you ate it, you slayed it. 🌈✨

this was libmongoc version 1.30.13, dated Oct 09, 2026 β€” and that's your official sign-off from me to you. mwah. πŸ’–πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from