MONGOC_CLIENT...RT_TRANSACTION(3)

πŸŽ€ MONGOC_CLIENT...RT_TRANSACTION(3) πŸŽ€

okay bestie, welcome to the libmongoc corner of the manual β€” this one's about the abort button on a multi-document transaction, and honestly? it's giving "we tried, it didn't slay, roll it back" πŸ’…


✨ SYNOPSIS ✨

bool
mongoc_client_session_abort_transaction (mongoc_client_session_t *session,
                                         bson_error_t *error);

Abort a multi-document transaction. that's the whole assignment 🫢


🌸 PARAMETERS 🌸

  • session β€” a mongoc_client_session_t, the session whose transaction you're about to shut down. your main character struct πŸ’–
  • error β€” an optional location for a bson_error_t, or NULL if you're built different and don't want the tea (no error info for you).

πŸ”₯ RETURN πŸ”₯

Returns true if the transaction was aborted. Returns false and sets error if there are invalid arguments, like a session with no transaction in progress β€” yeah, you can't abort a vibe that doesn't exist, sorry 😭

Network or server errors are ignored. like, completely. not even acknowledged. (they said not my problem πŸ’€)


πŸ‘‘ AUTHOR πŸ‘‘

MongoDB, Inc


2009-present, MongoDB, Inc.


real talk: if error gets set, it's about your arguments being invalid β€” not about the network or the server being messy. those get ignored, no cap.

later bestie πŸ’œ this was libmongoc 2.5.6, dated Oct 09, 2026 β€” go forth and abort those transactions βœ¨πŸ¦‹

πŸ“¦ where this page comes from