Releases: mongodb/mongo-go-driver
MongoDB Go Driver 1.7.3
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
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
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
โ ๏ธ 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
โ ๏ธ 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
โ ๏ธ 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:
MongoDB Go Driver 1.6.0
โ ๏ธ 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.0 of the official Go driver.
This release supports several new features introduced in MongoDB server 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.
Versioned API
This release adds versioned API: a new feature in MongoDB 5.0 that allows user-selectable API versions, subsets of MongoDB server semantics, to be declared on a Client
with ServerAPIOptions
. See an explanatory blog post here.
ServerAPIOptions
can be declared on a Client
in the Go driver with SetServerAPIOptions
. Within a ServerAPIOptions
instance, ServerAPIVersion
specifies the declared API version, Strict
specifies whether the server should error when it receives a command that is not part of the declared API version, and DeprecationErrors
specifies whether the server should error when it receives a command that is deprecated in the declared API version.
Load Balancer Support
The Go driver now supports connecting to any MongoDB service (such as MongoDB Serverless) that is running behind a load balancer.
ClientOptions
contains a new LoadBalanced
flag that can be set with SetLoadBalanced
or by passing loadBalanced=true
into the initial URI string.
Time-series Collections
This release allows the creation of time-series collections: a new collection type that will automatically organize time-series data into buckets on insert, while automatically unwinding the buckets for query purposes.
CreateCollectionOptions
contains a new TimeSeriesOptions
field that can be set with SetTimeSeries
. The fields of TimeSeriesOptions
are defined as follows. TimeField
specifies the name of the top-level field that will represent the timestamp in the collection's documents. MetaField
can specify the name of the top-level field that will describe the series in the collection's documents. Granularity
can specify the desired granularity of the time-series data (at present, this value can be "seconds", "minutes" or "hours").
CreateCollectionsOptions
also contains a new ExpireAfterSeconds
field that can be set with SetExpireAfterSeconds
. ExpireAfterSeconds
can specify how many seconds to wait before old time-series data should be deleted from the time-series collection.
Let Option on Aggregate
Let
can now be specified on aggregates. See an explanation and examples of the let option in the aggregate
documentation.
AggregateOptions
contains a new Let
field that can be set with SetLet
.
Release Notes
For a full list of tickets included in this release, please see the links below:
MongoDB Go Driver 1.5.4
The MongoDB Go driver team is pleased to release version 1.5.4 of the official Go driver.
This release contains several bug fixes, including:
- Prevent clearing server connection pools on operation-scoped timeouts.
- Always enable SRV polling when setting a
mongodb+srv://
URI viaApplyURI()
.
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.5.3
The MongoDB Go driver team is pleased to release 1.5.3 of the official Go driver.
This release contains several bug fixes.
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.5.2
The MongoDB Go driver team is pleased to release 1.5.2 of the official Go driver.
This release contains several bug fixes.
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: