MONGOC_SESSIO..._SNAPSHOT_TIME(3)

πŸ“¦
version 2.5.6 Β· 2 versions
, in epel 10

πŸ’… MONGOC_SESSIO..._SNAPSHOT_TIME(3) πŸ’…

okay bestie, gather round, because this is a libmongoc moment and honestly it's kind of a serve. this page is literally about mongoc_session_opts_set_snapshot_time() and it's not even scary, i promise 🫢


✨ SYNOPSIS ✨

like, here's the whole vibe, verbatim, no notes:

void
mongoc_session_opts_set_snapshot_time (mongoc_session_opt_t *opts,
                                       uint32_t timestamp,
                                       uint32_t increment);

🌸 DESCRIPTION 🌸

so the way this works is you're configuring the desired snapshot time for a snapshot session, and it's expressed as a BSON Timestamp with a timestamp component and an increment component. two little numbers, one big vibe ✨

when you set it, the session will use this snapshot time instead of determining one from the first read operation. like, you're telling it "bestie, i already know the time, don't go looking for one" πŸ’…

typically the value is obtained from mongoc_client_session_get_snapshot_time() on a previous session β€” so it's giving "hand me down from your last session" energy, and honestly? iconic.

⚠️ okay this part matters: it is an error to call mongoc_client_start_session() with a snapshotTime set unless mongoc_session_opts_set_snapshot() is also set to true. no cap, do not skip that step or it's going to be a whole thing 😭

πŸŽ€ PARAMETERS πŸŽ€

  • opts: a mongoc_session_opt_t πŸ’–
  • timestamp: a uint32_t for the timestamp component ⭐
  • increment: a uint32_t for the increment component πŸ¦‹

πŸ‘‘ AUTHOR πŸ‘‘

MongoDB, Inc β€” yeah, that's the main character energy right there πŸ’œ

2009-present, MongoDB, Inc. β€” periodt, protect that copyright πŸŽ€


and that's the whole page, bestie, you ate that πŸ“

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

πŸ“¦ where this page comes from