Skip to content

Releases: mongodb/mongo-go-driver

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:

MongoDB Go Driver 1.7.3

05 Oct 17:46
Compare
Choose a tag to compare

The MongoDB Go driver team is pleased to release version 1.7.3 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:

MongoDB Go Driver 1.7.2

02 Sep 18:55
v1.7.2
ae7e036
Compare
Choose a tag to compare

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

This release contains various bug fixes, including:

  • Fix for a data race that can occur between creating and checking out connections when minPoolSize > 0.
  • Filter servers based on localThresholdMS when opening a new ChangeStream.

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.6.2

02 Sep 18:50
v1.6.2
4475739
Compare
Choose a tag to compare

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

This release contains a bug fix for a data race that can occur between creating and checking out connections when minPoolSize > 0.

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.1

03 Aug 19:57
Compare
Choose a tag to compare

⚠️ Retracted

This release has been retracted due to a data race that can occur between creating and checking out connections when minPoolSize > 0.

Please use version 1.7.2 or higher.


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

This release contains a bug fix and a minor documentation update:

  • A fix for a data race in appending connection options to the server config
  • A clarification in documentation of StartSession behavior

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.6.1

03 Aug 19:54
Compare
Choose a tag to compare

⚠️ Retracted

This release has been retracted due to a data race that can occur between creating and checking out connections when minPoolSize > 0.

Please use version 1.6.2 or higher.


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

This release contains a bug fix for a data race in appending connection options to the server config.

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.7.0

20 Jul 22:22
v1.7.0
d98d92b
Compare
Choose a tag to compare

⚠️ Retracted

This release has been retracted due to a data race that can occur between creating and checking out connections when minPoolSize > 0.

Please use version 1.7.2 or higher.


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

This release supports additional features introduced in MongoDB version 5.0.

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.

Snapshot Reads Without Transaction

Supports using the "snapshot" read concern outside of transactions for certain operations.

Example of using a Session with "snapshot" read concern outside of a transaction for a Find operation:

var client *mongo.Client

// Create a new Session with "snapshot" reads enabled, then create a
// SessionContext with the new Session.
sess, err := client.StartSession(options.Session().SetSnapshot(true))
if err != nil {
	panic(err)
}
defer sess.EndSession(context.TODO())
sessCtx := mongo.NewSessionContext(context.TODO(), sess)

coll := client.Database("db").Collection("coll")
cursor, err := coll.Find(sessCtx, bson.D{{"x", 1}})
defer cursor.Close(context.TODO())

// Use the cursor to read Find results with "snapshot" read concern.

Detailed Document Validation Errors

Surface the improved error messages for schema validation in MongoDB 5.0 in WriteException and BulkWriteException error messages and via the new field WriteError.Details.

Release Notes

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