github mongodb/mongo-c-driver 1.2.0
mongo-c-driver 1.2.0

latest releases: debian/1.29.0-1, 1.29.0, debian/1.28.1-1...
9 years ago

It is my pleasure to announce to you the MongoDB C driver 1.2.0.

This is a stable release with additive ABI changes and bugfixes. It is
compatible with MongoDB version 2.4 and later.

The following notes summarize changes since the previous stable release,
1.1.11, including changes in the 1.2.0 betas and release candidate.

This version rewrites mongoc_client_t's internals to match two important new
specs for MongoDB drivers: the Server Discovery And Monitoring Spec and the
Server Selection Spec. The rewritten client has many advantages:

  • All replica set members or mongos servers are discovered and periodically
    checked in parallel. The driver's performance is dramatically better and
    more predictable with multi-server deployments, or with a flaky network,
    or when some servers are slow or down.
  • Clients from the same mongoc_client_pool_t share a background thread that
    discovers and monitors all servers in parallel.
  • Unnecessary round trips for server checks and pings are eliminated.
  • Behavior is documented in the specs, and consistent with other drivers,
    even in complex or unusual scenarios.
  • The URI's "replicaSet" option is enforced: the driver now refuses to connect
    to a server unless it is a member of a replica set with the correct setName.
  • Many race conditions related to changing deployment conditions are fixed.

To conform to the new specs, the client now accepts these options in the
MongoDB URI; see the mongoc_uri_t documentation for details:

  • heartbeatFrequencyMS
  • serverSelectionTimeoutMS
  • serverSelectionTryOnce
  • socketCheckIntervalMS

Other features:

  • All timeouts that can be configured in the URI now interpret 0 to mean "use
    the default value for this timeout".
  • The client's read preference can be configured in the URI with the new
    options "readPreference" and "readPreferenceTags"; see the mongoc_uri_t
    documentation.
  • The new mongoc_uri_get_read_prefs_t function retrieves both the read mode
    and tags from a mongoc_uri_t.
  • New accessors mongoc_gridfs_file_get_id, mongoc_client_get_default_database,
    and mongoc_bulk_operation_get_write_concern.
  • Debug tracing can be controlled at runtime with mongoc_log_trace_enable and
    mongoc_log_trace_disable.
  • Set mongoc_client_pool_t's size with mongoc_client_pool_min_size()
    and mongoc_client_pool_max_size().

Other changes:

  • Enable runtime asserts in release build.
  • The libbson submodule's URL now uses the recommended https://, not git://
  • mongoc_client_kill_cursor is now deprecated and will be removed in 2.0.
  • The write concern "w=-1" is documented as obsolete.

These notable bugs have been fixed since 1.1.11:

  • The driver now uses the server's maxWireVersion to avoid an error and
    extra round-trip when executing aggregations on MongoDB 2.4 and older.
  • Much improved reporting of network errors, unavailable servers, and
    authentication failure
  • Off-by-one error in mongoc_gridfs_file_seek with mode SEEK_END
  • The writeConcernErrors field of bulk results is properly formatted.
  • A cursor with a server "hint" sets slaveOkay and / or $readPreference.
  • Destroying an exhaust cursor must close its socket
  • "wtimeoutms" was ignored for write concerns besides "majority".
  • Bulk write operations might fail in mixed-version sharded clusters with
    some pre-2.6 mongos servers.
  • A variety of bugs and incorrect results in mongoc_bulk_operation_execute.
  • Numerous compiler warnings and build failures on various platforms.
  • Copious refinements to the documentation.

Thanks to everyone who contributed to this version of libmongoc.

  • Jason Carey
  • Samantha Ritter
  • A. Jesse Jiryu Davis
  • Hannes Magnusson
  • Kyle Suarez
  • Jeremy Mikola
  • Remi Collet
  • Jose Sebastian Battig
  • Derick Rethans
  • Yuchen Xie
  • Manuel Schoenlaub
  • Sujan Dutta
  • Lloyd Zhou
  • rubicks
  • Pawel Szczurko
  • Yuval Hager

Peace,

A. Jesse Jiryu Davis

Don't miss a new mongo-c-driver release

NewReleases is sending notifications on new releases.