mongoc_read_concern_t - Man Page

Read Concern abstraction

Synopsis

New in MongoDB 3.2.

The mongoc_read_concern_t allows clients to choose a level of isolation for their reads. The default, MONGOC_READ_CONCERN_LEVEL_LOCAL, is right for the great majority of applications.

You can specify a read concern on connection objects, database objects, or collection objects.

See readConcern <https://www.mongodb.com/docs/master/reference/readConcern/> on the MongoDB website for more information.

Read Concern is only sent to MongoDB when it has explicitly been set by mongoc_read_concern_set_level() <> to anything other than NULL.

Read Concern Levels

MacroDescriptionFirst MongoDB version
MONGOC_READ_CONCERN_LEVEL_LOCALLevel "local", the default.3.2
MONGOC_READ_CONCERN_LEVEL_MAJORITYLevel "majority".3.2
MONGOC_READ_CONCERN_LEVEL_LINEARIZABLELevel "linearizable".3.4
MONGOC_READ_CONCERN_LEVEL_AVAILABLELevel "available".3.6
MONGOC_READ_CONCERN_LEVEL_SNAPSHOTLevel "snapshot".4.0

For the sake of compatibility with future versions of MongoDB, mongoc_read_concern_set_level() <> allows any string, not just this list of known read concern levels.

See Read Concern Levels <https://www.mongodb.com/docs/manual/reference/read-concern/#read-concern-levels> in the MongoDB manual for more information about the individual read concern levels.

Author

MongoDB, Inc

Info

Jan 27, 2026 1.30.6 libmongoc