Announcing libbson and libmongoc 1.10.0

35 views
Skip to first unread message

A. Jesse Jiryu Davis

unread,
May 21, 2018, 9:37:19 AM5/21/18
to mongodb-...@googlegroups.com, mongod...@googlegroups.com

I'm pleased to announce version 1.10.0 of libbson and libmongoc, the libraries constituting the MongoDB C Driver. libbson and libmongoc are now maintained in the mongo-c-driver repository, although they are still built as separate libraries, and libbson can still be used without libmongoc. Building libbson and libmongoc now requires CMake on all platforms. The Autotools build scripts ("configure" and related scripts) have been deleted. See the "installing" page for updated instructions.

libbson

This version adds the following features:

  • Additional functions for strings of known length (not necessarily null- terminated): 
    bson_iter_find_w_len
    bson_iter_init_find_w_len
    bson_append_regex_w_len
    bson_decimal128_from_string_w_len

libmongoc

This version drops support for MongoDB 2.6 and adds the following features and bugfixes:

  • IPv6 is now fully supported and conforms to RFC-6555. If a hostname has both IPv4 and IPv6 DNS records, the driver tries connecting with IPv6 first. If a connection can't be established after 250ms then IPv4 is tried in parallel. Whichever succeeds connection first cancels the other. The successful DNS result is cached for 10 minutes.
  • If CMake is configured with ENABLE_SSL=AUTO (the default), libmongoc now uses native TLS libraries on Mac and Windows, and OpenSSL everywhere else. Before, it would search for OpenSSL on all platforms and only use native TLS on Mac and Windows as a fallback.
  • The driver now handshakes SSL connections to multiple servers in a replica set or sharded cluster in parallel, so long as it uses OpenSSL or Windows SChannel. (SSL handshakes with Apple's Secure Transport are still serial.) A larger receive buffer with SChannel increases performance over slow connections.
  • All functions that accept read concern now prohibit it, if MongoDB is too old to support it (MongoDB 3.0).
  • Client sessions are now prohibited with unacknowledged writes.
  • mongoc_collection_find_and_modify_with_opts now prohibits write concern if MongoDB is too old to support it (MongoDB 3.0).
  • Other helper functions for commands that write, now prohibit write concern if MongoDB is too old to support it (pre-3.4): mongoc_client_read_write_command_with_opts mongoc_client_write_command_with_opts mongoc_collection_read_write_command_with_opts mongoc_collection_write_command_with_opts mongoc_database_read_write_command_with_opts mongoc_database_write_command_with_opts mongoc_collection_aggregate with $out mongoc_collection_drop_index_with_opts mongoc_collection_drop_with_opts mongoc_collection_rename_with_opts mongoc_database_drop_with_opts Write concern behavior is unchanged for regular CRUD functions.
  • Setting a negative writeConcern level of -2 or smaller, via the "opts" parameter to functions that accept BSON options, is now prohibited. The special "w" values -2 through -4 are only used internally. The deprecated "w=-1" is still allowed, as a synonym for "w=0".
  • The Kerberos URI option authMechanismProperties=CANONICALIZE_HOST_NAME:true is now implemented with the Windows Kerberos provider, SSPI.
  • This repository now includes GDB and LLDB customizations for pretty-printing bson_t structs as JSON while debugging. See the "debugging" page.
  • The internal preprocessor symbol HAVE_STRINGS_H has been renamed BSON_HAVE_STRINGS_H. If you maintain a handwritten bson-config.h you must rename this symbol.
  • The following helper functions do not work with mongoc_client_session_t, they are deprecated in favor of running MongoDB commands directly with a function like mongoc_client_read_command_with_opts:
        mongoc_client_get_server_status
        mongoc_collection_stats
        mongoc_collection_validate
  • mongoc_cursor_is_alive is now deprecated for mongoc_cursor_more, which is functionally equivalent.

Links:

Thanks to everyone who contributed to this release.

  • A. Jesse Jiryu Davis
  • Kevin Albertson
  • Roberto C. Sánchez
  • Jeremy Mikola
  • Xiangyu Yao
  • Jeroen Ooms
  • Derick Rethans
  • Kaitlin Mahar
  • Pavithra Vetriselvan
  • NotSpooky
  • Iulian Rotaru
  • Katherine Walker
  • Mansuro
  • Petr Písař

Reply all
Reply to author
Forward
0 new messages