MONGOC_READ_CONCERN_T(3)

πŸŽ€ Read Concern abstraction πŸŽ€

welcome to the MONGOC_READ_CONCERN_T(3) page from the libmongoc manual, bestie. this is the whole read-concern situation, and yes it slays.

πŸ’… SYNOPSIS πŸ’…

✨ New in MongoDB 3.2.

mongoc_read_concern_t lets clients choose a level of isolation for their reads β€” think of it as setting the vibe for how much consistency you want. The default, MONGOC_READ_CONCERN_LEVEL_LOCAL, is right for the great majority of applications. no cap.

You can specify a read concern on connection objects, database objects, or collection objects. all three, your choice.

See readConcern on the MongoDB website for more info.

🚨 Read Concern is only sent to MongoDB when it has explicitly been set by mongoc_read_concern_set_level() to anything other than NULL. If it's NULL, it does not get sent. periodt.

🌈 READ CONCERN LEVELS 🌈

okay so here's the level menu β€” macro, what it means, and the first MongoDB version it showed up in:

  • MONGOC_READ_CONCERN_LEVEL_LOCAL β€” level "local", and it's the default. first MongoDB version: 3.2.
  • MONGOC_READ_CONCERN_LEVEL_MAJORITY β€” level "majority". first MongoDB version: 3.2.
  • MONGOC_READ_CONCERN_LEVEL_LINEARIZABLE β€” level "linearizable". first MongoDB version: 3.4.
  • MONGOC_READ_CONCERN_LEVEL_AVAILABLE β€” level "available". first MongoDB version: 3.6.
  • MONGOC_READ_CONCERN_LEVEL_SNAPSHOT β€” level "snapshot". first MongoDB version: 4.0.

For the sake of compatibility with future versions of MongoDB, mongoc_read_concern_set_level() allows any string, not just the known read concern levels in that list. she's flexible like that.

See Read Concern Levels in the MongoDB manual for more about the individual read concern levels.

πŸ‘‘ AUTHOR πŸ‘‘

MongoDB, Inc

2009-present, MongoDB, Inc.


that's the page, bestie πŸ’– source/version: libmongoc 2.5.6, dated Oct 09, 2026. bye, go read with concern πŸ¦‹πŸ’…

πŸ“¦ where this page comes from