Skip to content

MongoDB Go Driver 1.4.0-beta1

Pre-release
Pre-release
Compare
Choose a tag to compare
@divjotarora divjotarora released this 10 Apr 19:06
· 1615 commits to master since this release

The MongoDB Go driver team is pleased to release 1.4.0-beta1 of the official Go driver.

This release contains support for some MongoDB server version 4.4 features and improvements to the driver API.

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.

Context for BSON Errors

In previous versions, unmarshalling BSON bytes into a struct could fail with errors like cannot decode string into int32 type. These errors lacked context and could be confusing to debug. This release adds context to these errors to provide both the BSON key and the struct field name which caused the error. A similar error is now in the form error decoding key foo(fieldFoo): cannot decode string into int32 type.

Release Notes

New Feature

  • [GODRIVER-952] - Lack of context in error description like "cannot decode 64-bit integer into a string type"
  • [GODRIVER-1390] - Support shorter SCRAM conversation
  • [GODRIVER-1542] - Implement primitive.DateTime.UnmarshalJSON

Task

Improvement

  • [GODRIVER-672] - Remove bsonx dependency in driver/session
  • [GODRIVER-1398] - Improve testing around default writeConcern
  • [GODRIVER-1437] - Expand use of error labels for RetryableWrites
  • [GODRIVER-1444] - Change uri_options/auth-options spec test to enable conditional tests
  • [GODRIVER-1445] - Verify max set version and max election id on topologies in SDAM spec tests
  • [GODRIVER-1464] - Make ExceededTimeLimit retryable writes error
  • [GODRIVER-1470] - Raise error if hint specified for unacknowledged update using OP_MSG or OP_UPDATE
  • [GODRIVER-1483] - Add error labels to WriteExceptions
  • [GODRIVER-1499] - Remove timeout check from server selection fast path
  • [GODRIVER-1508] - Allow hinting the delete command
  • [GODRIVER-1509] - Use whitelist for change stream resumability
  • [GODRIVER-1524] - Unreachable code and confusing error message in loadCert
  • [GODRIVER-1526] - Support speculative authentication attempts in isMaster
  • [GODRIVER-1528] - RetryableWrites specification improvements
  • [GODRIVER-1536] - Ensure that the WriteConcernError "errInfo" object is propagated
  • [GODRIVER-1543] - Remove ElectionInProgress (216) from ResumableChangeStreamError
  • [GODRIVER-1546] - Expose gridfs files and chunks collections
  • [GODRIVER-1548] - Access filename and metadata in gridfs DownloadStream
  • [GODRIVER-1551] - Allow BSON undefined to decode to Go types