Skip to content

Releases: mongodb/mongo-go-driver

MongoDB Go Driver 1.3.0

05 Feb 16:43
Compare
Choose a tag to compare

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

This release contains new functions to construct BSON registries, a new BSON registry that mimics the behavior of the globalsign/mgo/bson library, and new URI options to specify TLS certificates and keys as separate files. As part of this release, support for Go modules has been added and the README has been changed to reflect this. There is still a vendor directory in the source code so projects can be compiled with versions of Go that do not support modules.

Documentation can be found on GoDoc and the MongoDB documentation site. BSON library documentation is also available on GoDoc. Questions and inquiries can be asked on the mongo-go-driver Google Group. Bugs can be reported in the Go Driver Jira where a list of current issues can be found.

mgo compatible BSON

A new mgocompat package has been added under the top-level bson package. This package exports Registry, which is a BSON registry compatible with globalsign/mgo/bson and RegistryRespectNilValues, which is compatible with globalsign/mgo/bson with the RespectNilValues flag set to true. These registries can be used via the ClientOptions.SetRegistry method. The package also exports a RegistryBuilder for each of the registries so additional changes can be made. See the bson/bsoncodec package documentation for more information.

RegistryBuilder method changes

The existing RegisterEncoder methods has been deprecated and replaced by RegisterTypeEncoder and RegisterHookEncoder. A corresponding change has been made for RegisterDecoder as well.

Release Notes

Bug

  • [GODRIVER-1002] - Credential.PasswordSet doesn't work or is incorrectly documented
  • [GODRIVER-1411] - Data race between creating a new connection and disconnecting topology
  • [GODRIVER-1466] - Overriding the type map entry for embedded document does not work
  • [GODRIVER-1476] - mongodb+srv doesn't work with a fully qualified DNS name
  • [GODRIVER-1478] - Pooled sessions should have use time updated when retrieved from the pool

New Feature

  • [GODRIVER-580] - Need to be able to unmarshall to bson.D field within a struct
  • [GODRIVER-917] - Difference in BSON/JSON serialization of nil primitive.D compared to mgo
  • [GODRIVER-1175] - allow BSON null values to decode into non-nilable Go types
  • [GODRIVER-1354] - Create ObjectIDCodec that accepts bsontype.String for decoding
  • [GODRIVER-1356] - Support mgo's Getter and Setter interfaces
  • [GODRIVER-1358] - Add UIntCodec for mgocompat
  • [GODRIVER-1361] - Create mgocompat.Registry
  • [GODRIVER-1362] - Add SliceCodec for mgocompat

Task

  • [GODRIVER-904] - Improve docs for how to write custom codecs
  • [GODRIVER-938] - cannot convert types that use mgobson.ObjectId to new bson library.
  • [GODRIVER-1381] - GridFS GoDoc examples
  • [GODRIVER-1427] - Add more sessions tests with more read and write commands
  • [GODRIVER-1448] - Read operations options documentation

Improvement

  • [GODRIVER-543] - Enable support for Go 1.11 modules
  • [GODRIVER-1421] - Add EmptyInterfaceCodec for mgocompat
  • [GODRIVER-1429] - add ByteArrayCodec for mgocompat
  • [GODRIVER-1430] - allow strings and binaries to decode to symbols
  • [GODRIVER-1433] - Add RespectNilValues equivalent for the mgo registry
  • [GODRIVER-1435] - Please add tlsCertificateFile and tlsKeyFile connection string options.
  • [GODRIVER-1438] - Separate RegisterEncoder/Decoder functions to "types" and "hooks"
  • [GODRIVER-1455] - Use a pure go implementation for zstd
  • [GODRIVER-1460] - Document mgocompat
  • [GODRIVER-1461] - Validate that mongocryptd is not spawned if bypassAutoEncryption=true

MongoDB Go Driver 1.2.1

08 Jan 14:57
Compare
Choose a tag to compare

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

This release contains several bug fixes.

Documentation can be found on GoDoc and the MongoDB documentation site. BSON library documentation is also available on GoDoc. Questions and inquiries can be asked on the mongo-go-driver Google Group. Bugs can be reported in the Go Driver Jira where a list of current issues can be found.

Release Notes

Bug

  • [GODRIVER-1428] - operation.CreateIndexes doesn't support WriteConcern
  • [GODRIVER-1439] - Only close heartbeat connections after they're opened
  • [GODRIVER-1442] - Fix connection error handling in ProcessError
  • [GODRIVER-1450] - BulkWriteError's request is not the correct one
  • [GODRIVER-1456] - Extended JSON writer should escape keys

MongoDB Go Driver 1.1.4

17 Dec 19:17
Compare
Choose a tag to compare

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

This release contains a bug fix for error checking in the driver's monitoring routine. Prior to this fix, the driver would try to close a monitoring connection if the underlying net.Conn was non-nil. This caused issues for some users with custom dialers due to the nil-interface behavior in Go (see https://golang.org/doc/faq#nil_error). This fix makes it so the driver does not call any methods on connections returned by dialers if the error returned is non-nil.

Documentation can be found on GoDoc and the MongoDB documentation site. BSON library documentation is also available on GoDoc. Questions and inquiries can be asked on the mongo-go-driver Google Group. Bugs can be reported in the Go Driver Jira where a list of current issues can be found.

Release Notes

Bug

  • [GODRIVER-1439] - Only close heartbeat connections after they're opened

MongoDB Go Driver 1.2.0

10 Dec 18:55
b414b89
Compare
Choose a tag to compare

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

This release contains GA support for client-side field level encryption, a new bson.MarshalValue function to marshal Go values to BSON, and various documentation improvements to add more details and examples to GoDoc.

Documentation can be found on GoDoc and the MongoDB documentation site. BSON library documentation is also available on GoDoc. Questions and inquiries can be asked on the mongo-go-driver Google Group. Bugs can be reported in the Go Driver Jira where a list of current issues can be found.

Release Notes

Bug

Epic

New Feature

Story

Task

Read more

MongoDB Go Driver 1.1.3

05 Nov 18:42
Compare
Choose a tag to compare

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

This release contains several bug fixes.

Documentation can be found on GoDoc and the MongoDB documentation site. BSON library documentation is also available on GoDoc. Questions and inquiries can be asked on the mongo-go-driver Google Group. Bugs can be reported in the Go Driver Jira where a list of current issues can be found.

Release Notes

Bug

  • [GODRIVER-1345] - Cancel in-progress heartbeats when disconnecting
  • [GODRIVER-1351] - nil panic on conn close for change stream aggregation operation

Improvement

  • [GODRIVER-1364] - Allow authentication to all server types except arbiters

MongoDB Go Driver 1.1.2

07 Oct 16:02
Compare
Choose a tag to compare

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

This release contains several bug fixes.

Documentation can be found on GoDoc and the MongoDB documentation site. BSON library documentation is also available on GoDoc. Questions and inquiries can be asked on the mongo-go-driver Google Group. Bugs can be reported in the Go Driver Jira where a list of current issues can be found.

Release Notes

Bug

Mongo Go Driver 1.1.1

05 Sep 18:10
Compare
Choose a tag to compare

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

This release contains several bug fixes.

Documentation can be found on GoDoc and the MongoDB documentation site. BSON library documentation is also available on GoDoc. Questions and inquiries can be asked on the mongo-go-driver Google Group. Bugs can be reported in the Go Driver Jira where a list of current issues can be found.

Release Notes

Backport

Bug

MongoDB Go Driver 1.1.0

13 Aug 16:12
Compare
Choose a tag to compare

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

This release contains support for MongoDB server version 4.2.

Documentation can be found on GoDoc and the MongoDB documentation site. BSON library documentation is also available on GoDoc. Questions and inquiries can be asked on the mongo-go-driver Google Group. Bugs can be reported in the Go Driver Jira where a list of current issues can be found.

Core Driver Redesign

The lower-level driver implementation was redesigned. The improved lower-level driver contained improvements to increase maintainability and greatly increase performance.

Connection Pool Monitoring

The Connection Monitoring and Pooling specification has been implemented. This changes the pool implementation to LIFO, which improves connection utilization. The addition of event.PoolMonitor enables users to monitor various connection and connection pool related events.

Release Notes

Bug

  • [GODRIVER-1018] - record codeName for WriteConcernErrors
  • [GODRIVER-1073] - ChangeStream spec's Resumable Error definition is too broad
  • [GODRIVER-1084] - Data race in topology tests
  • [GODRIVER-1085] - Change stream test failures on Evergreen
  • [GODRIVER-1100] - Closing batch cursor after find gets "ended session was used"
  • [GODRIVER-1107] - SetHint causes InvalidBSON error
  • [GODRIVER-1108] - Operation.addReadConcern encodes "empty" ReadConcern
  • [GODRIVER-1114] - RunCommandCursor always fails and returns an error message referencing internal driver details
  • [GODRIVER-1130] - Pinned Servers should be cleared properly
  • [GODRIVER-1153] - nil pointer asMDoc
  • [GODRIVER-1160] - driver.BatchCursor Next returns true when first batch is empty
  • [GODRIVER-1187] - Find() uses a write selector instead of a read selector
  • [GODRIVER-1215] - lastWriteDate is parsed from isMaster incorrectly
  • [GODRIVER-1224] - Race detected in x/mongo/driver/topology
  • [GODRIVER-1226] - localThresholdMS does not default to 15 ms

New Feature

  • [GODRIVER-620] - Implement Unified URI Options
  • [GODRIVER-621] - Implement Convenient API for Transactions
  • [GODRIVER-622] - Implement Connection Monitoring and Pooling spec
  • [GODRIVER-623] - Support mongos pinning for sharded transactions
  • [GODRIVER-624] - Retryable Reads
  • [GODRIVER-625] - Support polling SRV records for mongos discovery
  • [GODRIVER-628] - Connections survive primary stepdown
  • [GODRIVER-637] - Support sharded transactions recovery token
  • [GODRIVER-680] - Support running commands as aggregation
  • [GODRIVER-690] - Transaction test runner should use "local" read concern when asserting the final collection state
  • [GODRIVER-723] - Missing ListCollectionNames
  • [GODRIVER-736] - Add comparison methods to primitive.Timestamp
  • [GODRIVER-745] - Resync change stream tests to test all new notification types
  • [GODRIVER-765] - Support 'startAfter' option to the $changeStream stage
  • [GODRIVER-808] - Add support for Split-Horizon Topology
  • [GODRIVER-822] - Support Retryable Writes on by Default
  • [GODRIVER-824] - Support postBatchResumeToken in change streams
  • [GODRIVER-841] - Resync SDAM tests to only examine non-unknown server descriptions to determine incompatibility
  • [GODRIVER-845] - Add support for majority read concern level to Aggregation $out
  • [GODRIVER-913] - countDocuments should use group with _id: 1
  • [GODRIVER-916] - Cursor method to decode all results into a slice
  • [GODRIVER-919] - Add the ability to specify a pipeline to an update command
  • [GODRIVER-927] - Create new driver package
  • [GODRIVER-928] - Update topology.Topology type
  • [GODRIVER-929] - Create topology.pool type
  • [GODRIVER-930] - Implement base driver.Connection type
  • [GODRIVER-931] - Implement topology.legacyConnection type
  • [GODRIVER-932] - Update topology.Server type
  • [GODRIVER-978] - Implement driver.Operation
  • [GODRIVER-984] - Add support for legacy find, getMore, and killCursors to driver.Operation
  • [GODRIVER-985] - Design & Implement drivergen
  • [GODRIVER-992] - Add compression to driver.Operation
  • [GODRIVER-993] - Add command monitoring to driver.Operation
  • [GODRIVER-1081] - Allow applications to set maxTimeMS for commitTransaction
  • [GODRIVER-1209] - Create LocalAddresser interface and make topology.Connection implement it
  • [GODRIVER-1219] - Raise an actionable error message when retryWrites fails due to using an unsupported storage engine

Task

  • [GODRIVER-589] - Bump wire protocol version for 4.2
  • [GODRIVER-968] - Add tests for postBatchResumeToken support
  • [GODRIVER-969] - Test writes in transactions do not send writeConcern when collection write concern is w=0
  • [GODRIVER-970] - Amend change stream missing resume token tests for wire version 8+
  • [GODRIVER-1009] - Implement batch cursor in driver lib
  • [GODRIVER-1015] - Set OP_MSG flags in driver.Operation
  • [GODRIVER-1026] - Skip ReadWireMessage for unacknowledged writes
  • [GODRIVER-1035] - Clear pinned server on TransientTransa...
Read more

MongoDB Go Driver 1.0.4

09 Jul 18:42
Compare
Choose a tag to compare

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

This release contains several bug fixes. Please refer to the Jira issues below for more information.

Documentation can be found on GoDoc and the MongoDB documentation site. BSON library documentation is also available on GoDoc. Questions and inquiries can be asked on the mongo-go-driver Google Group. Bugs can be reported in the Go Driver Jira where a list of current issues can be found.

Release Notes

Bug

  • [GODRIVER-1013] - When reading whole file at once next read doesn't return EOF
  • [GODRIVER-1096] - When limit is set with a BatchCursor connected to a legacy server, a connection is leaked
  • [GODRIVER-1131] - QueryFailureError not wrapped in CommandError
  • [GODRIVER-1132] - Legacy ListCollections in driverlegacy does not filter indexes

Improvement

  • [GODRIVER-1021] - Specify behavior where connection string contain auth database but no credentials

MongoDB Go Driver 1.0.3

06 Jun 21:15
Compare
Choose a tag to compare

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

This release contains several bug fixes. Please refer to the Jira issues below for more information.

Documentation can be found on GoDoc and the MongoDB documentation site. BSON library documentation is also available on GoDoc. Questions and inquiries can be asked on the mongo-go-driver Google Group. Bugs can be reported in the Go Driver Jira where a list of current issues can be found.

Release Notes

Bug

  • [GODRIVER-1012] - Downloading big files from gridfs ends with ErrWrongSize
  • [GODRIVER-1016] - Get current op on MongoDB 2.6
  • [GODRIVER-1068] - Need to call ping in Ping()
  • [GODRIVER-1078] - Allow specifying empty value for connection URI readPreferenceTags option
  • [GODRIVER-1086] - Can leak creds through errors from URI Parsing