MONGOC_SESSIO..._SNAPSHOT_TIME(3)
π 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 callmongoc_client_start_session()with asnapshotTimeset unlessmongoc_session_opts_set_snapshot()is also set totrue. no cap, do not skip that step or it's going to be a whole thing π
π PARAMETERS π
opts: amongoc_session_opt_tπtimestamp: auint32_tfor the timestamp component βincrement: auint32_tfor the increment component π¦
π AUTHOR π
MongoDB, Inc β yeah, that's the main character energy right there π
π COPYRIGHT π
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
- epel 10: mongo-c-driver-devel 2.5.6-1.el10_3 Β· Apache-2.0 AND ISC AND MIT AND Zlib
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms