Skip to content

Releases: mongodb/mongo-go-driver

MongoDB Go Driver 1.7.6

11 Apr 22:00
v1.7.6
468152e
Compare
Choose a tag to compare

The MongoDB Go Driver Team is pleased to release version 1.7.6 of the official Go driver.

Release Notes

This release fixes a bug that can corrupt unmarshaled BSON values in specific circumstances.

For a full list of tickets included in this release, please see the links below:

Documentation for the Go driver can be found on pkg.go.dev and the MongoDB documentation site. BSON library documentation is also available on pkg.go.dev. Questions and inquiries can be asked on the MongoDB Developer Community. Bugs can be reported in the Go Driver Jira where a list of current issues can be found.

MongoDB Go Driver 1.9.0

06 Apr 15:34
Compare
Choose a tag to compare

The MongoDB Go driver team is pleased to release version 1.9.0 of the official Go driver.

Release Notes

This release contains improvements to connection pool management, an extended API, and a number of bug fixes.

Connection storm mitigation

Previously, the propensity of the driver to inundate a server with new connections during failover events was a particular pain point. This version of the driver contains a number of improvements to mitigate these connection "storms" including:

  • Consider server load during server selection
  • Prevent creating connections to unhealthy servers
  • Re-select a server if that server becomes unhealthy during check-out

Custom Aggregate and ChangeStream options

Certain use-cases may require supplying custom options on aggregate commands. These aggregate operations could be on a Database, Collection or for the creation of a ChangeStream. This version of the driver adds new API to specify custom options in these cases:

Note that all the custom options above must be marshalable into BSON. Users should always prefer using non-custom options where possible.

Let option for CRUD commands

This version of the driver adds a Let option to most CRUD command options. Let can be used to specify parameters for use in an aggregate expression context (e.g. "$$var"). Let must be a document mapping parameter names to values that are constant or closed expressions without references to document fields. Note that the Let option can only be used against server version 5.0 or higher. Let has been added to:

  • AggregateOptions
  • BulkWriteOptions
  • DeleteOptions
  • FindOptions
  • FindOneAndDeleteOptions
  • FindOneAndReplaceOptions
  • FindOneAndUpdateOptions
  • ReplaceOptions
  • UpdateOptions

Cursor and SingleResult constructors

This version of the driver exposes API to create Cursor and SingleResult instances from BSON document(s). In particular, two new constructor functions have been added: NewCursorFromDocuments and NewSingleResultFromDocument. The supplied document(s) must be marshalable and non-nil. These new functions should allow for the mocking of read operation results (such as Find, FindOne and Aggregate) for use in testing.


For a full list of tickets included in this release, please see the links below:

Documentation can be found on pkg.go.dev and the MongoDB documentation site. BSON library documentation is also available on pkg.go.dev. Questions and inquiries can be asked on the MongoDB Developer Community. Bugs can be reported in the Go Driver Jira where a list of current issues can be found.

MongoDB Go Driver 1.8.5

06 Apr 22:04
v1.8.5
5d470ea
Compare
Choose a tag to compare

The MongoDB Go driver team is pleased to release version 1.8.5 of the official Go driver.

Release Notes

This release fixes various bugs, including a bug that could cause duplicate session IDs and a bug that can corrupt unmarshaled BSON values in specific circumstances.

Documentation can be found on pkg.go.dev and the MongoDB documentation site. BSON library documentation is also available on pkg.go.dev. Questions and inquiries can be asked on the MongoDB Developer Community. Bugs can be reported in the Go Driver Jira where a list of current issues can be found.


For a full list of tickets included in this release, please see the links below:

MongoDB Go Driver 1.8.4

03 Mar 00:26
v1.8.4
1139ea1
Compare
Choose a tag to compare

The MongoDB Go driver team is pleased to release version 1.8.4 of the official Go driver.

This release resolves a bug that prevented an empty readPreferenceTags value in a connection string from acting as a "fail-safe" read preference tag that matches any eligible member (see documentation here).

Documentation can be found on pkg.go.dev and the MongoDB documentation site. BSON library documentation is also available on pkg.go.dev. Questions and inquiries can be asked on the MongoDB Developer Community. Bugs can be reported in the Go Driver Jira where a list of current issues can be found.

Release Notes

For a full list of tickets included in this release, please see the links below:

MongoDB Go Driver 1.8.3

01 Feb 18:57
Compare
Choose a tag to compare

The MongoDB Go driver team is pleased to release version 1.8.3 of the official Go driver.

This release contains a bug fix to allow the loading of multiple certs within a single PEM file.

Documentation can be found on pkg.go.dev and the MongoDB documentation site. BSON library documentation is also available on pkg.go.dev. Questions and inquiries can be asked on the MongoDB Developer Community. Bugs can be reported in the Go Driver Jira where a list of current issues can be found.

Release Notes

For a full list of tickets included in this release, please see the links below:

MongoDB Go Driver 1.8.2

05 Jan 20:59
v1.8.2
dc5bfa7
Compare
Choose a tag to compare

The MongoDB Go driver team is pleased to release version 1.8.2 of the official Go driver.

This release adds the ability to configure the recently added maxConnecting rate limit via the SetMaxConnecting function or the maxConnecting= URI option. The maxConnecting value sets the maximum number of new connections that can be created simultaneously.

Documentation can be found on pkg.go.dev and the MongoDB documentation site. BSON library documentation is also available on pkg.go.dev. Questions and inquiries can be asked on the MongoDB Developer Community. Bugs can be reported in the Go Driver Jira where a list of current issues can be found.

Release Notes

For a full list of tickets included in this release, please see the links below:

MongoDB Go Driver 1.8.1

08 Dec 20:18
Compare
Choose a tag to compare

The MongoDB Go driver team is pleased to release version 1.8.1 of the official Go driver.

This release contains a bug fix to correct the error type returned by IndexView.CreateMany.

Documentation can be found on pkg.go.dev and the MongoDB documentation site. BSON library documentation is also available on pkg.go.dev. Questions and inquiries can be asked on the MongoDB Developer Community. Bugs can be reported in the Go Driver Jira where a list of current issues can be found.

Release Notes

For a full list of tickets included in this release, please see the link below:

MongoDB Go Driver 1.8.0

23 Nov 21:53
Compare
Choose a tag to compare

The MongoDB Go driver team is pleased to release version 1.8.0 of the official Go driver.

This release supports additional features introduced in MongoDB version 5.1 and includes a refactor to our connection-pooling logic.

Documentation can be found on pkg.go.dev and the MongoDB documentation site. BSON library documentation is also available on pkg.go.dev. Questions and inquiries can be asked on the MongoDB Developer Community. Bugs can be reported in the Go Driver Jira where a list of current issues can be found.

CSFLE 1.0 KMIP Support

Supports using KMIP as a KMS provider for client side encryption.

Example of registering a client with auto-encryption through a KMIP KMS server with TLS.

// Provide KMS providers map with KMIP endpoint.
kmipKmsProviderMap := map[string]map[string]interface{}{
        "kmip": {
	        "endpoint": "IP.of.KMIP.Server",
        },
}

// Create TLS config with tlsCertificateKeyFile and tlsCAFile.
tlsConfig := make(map[string]*tls.Config)
tlsOpts := map[string]interface{}{
        "tlsCertificateKeyFile": "path/to/tls/certfile",
        "tlsCAFile":             "path/to/tls/cafile",
}

// Build config and handle error.
kmipConfig, err := options.BuildTLSConfig(tlsOpts)
if err != nil {
        panic(err)
}
tlsConfig["kmip"] = kmipConfig

// Create new client with auto-encryption options.
aeo := options.AutoEncryption().
        SetKmsProviders(kmipKmsProviderMap).
        SetKeyVaultNamespace("keyvault.datakeys").
        SetTLSConfig(tlsConfig)
opts := options.Client().ApplyURI("mongodb://localhost:27017").SetAutoEncryptionOptions(aeo)
client, err := mongo.NewClient(opts)
if err != nil {
        panic(err)
}

Oppressive Language Removal

Following the guidance documented here, we removed all oppressive and unnecessarily gendered language in the Go driver documentation, code, tests, and spec tests.

Connection Pool Redesign

The driver connection pool has been redesigned to work better when using low (< 30s) operation Context timeouts and reduce connection churn.

Behavior changes:

  • New connection creation is timed out at connectTimeoutMS. Previously, new connection creation was done synchronously with an operation and was timed out with the minimum of the operation Context timeout and connectTimeoutMS.
  • At most 2 connections are established at the same time. Previously, the max number of new connections established at the same time was maxPoolSize.

Release Notes

For a full list of tickets included in this release, please see the links below:

MongoDB Go Driver 1.7.5

23 Nov 16:41
Compare
Choose a tag to compare

The MongoDB Go driver team is pleased to release version 1.7.5 of the official Go driver.

This release removes an internal code generation tool and its associated dependencies.

Documentation can be found on pkg.go.dev and the MongoDB documentation site. BSON library documentation is also available on pkg.go.dev. Questions and inquiries can be asked on the MongoDB Developer Community. Bugs can be reported in the Go Driver Jira where a list of current issues can be found.

Release Notes

For a full list of tickets included in this release, please see the links below:

MongoDB Go Driver 1.7.4

03 Nov 15:38
Compare
Choose a tag to compare

The MongoDB Go driver team is pleased to release version 1.7.4 of the official Go driver.

This release contains several bugfixes.

Documentation can be found on pkg.go.dev and the MongoDB documentation site. BSON library documentation is also available on pkg.go.dev. Questions and inquiries can be asked on the MongoDB Developer Community. Bugs can be reported in the Go Driver Jira where a list of current issues can be found.

Release Notes

For a full list of tickets included in this release, please see the links below: