---
name: "mongoc_read_concern_t"
section: "3"
platform: "linux"
package: "libmongoc-doc"
version: "1.30.4-1+deb13u3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/mongoc_read_concern_t"
---

# mongoc\_read\_concern\_t(3)

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* 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

| | | |
| --- | --- | --- |
| Macro | Description | First MongoDB version |
| MONGOC\_READ\_CONCERN\_LEVEL\_LOCAL | Level "local", the default. | 3.2 |
| MONGOC\_READ\_CONCERN\_LEVEL\_MAJORITY | Level "majority". | 3.2 |
| MONGOC\_READ\_CONCERN\_LEVEL\_LINEARIZABLE | Level "linearizable". | 3.4 |
| MONGOC\_READ\_CONCERN\_LEVEL\_AVAILABLE | Level "available". | 3.6 |
| MONGOC\_READ\_CONCERN\_LEVEL\_SNAPSHOT | Level "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* in the MongoDB manual for more information about the individual read concern levels.

## AUTHOR

MongoDB, Inc

## COPYRIGHT

2009-present, MongoDB, Inc.
