The r2014.01.25 release of the mgo MongoDB driver for Go was just tagged.
More details about the project at: http://labix.org/mgo
The following changes were made in this release:
- Introduced FailFast option in DialInfo.
FailFast will cause connection and query attempts to fail faster when
the server is unavailable, instead of retrying until the configured
timeout period. Note that an unavailable server may silently drop
packets instead of rejecting them, in which case it's impossible to
distinguish it from a slow server, so the timeout stays relevant.
Feature requested by Louisa Berger and Cailin Nelson.
- Added Runner.PurgeMissing on txn package.
PurgeMissing removes from collections any state that refers to transaction
documents that for whatever reason have been lost from the system (removed
by accident or lost in a hard crash, for example).
This method should rarely be needed, if at all, and should never be
used during the normal operation of an application. Its purpose is to put
a system that has seen unavoidable corruption back in a working state.
Feature solves a problem reported by Roger Peppe and Peter Waller.
- Improve IsDup so it handles duplication errors with code 16460,
which happen on sharded environments. This is also being fixed
upstream in MongoDB, as reported in bug SERVER-11493.
Problem reported by Feng Liyuan.
- New DialServer field in mgo.DialInfo struct to customize how to establish
connections to MongoDB servers. This obsoletes the existent Dial field in
the same struct, although it continues to work for compatibility reasons.
The new field is defined as follows:
DialServer func(addr *ServerAddr) (net.Conn, error)
The mgo.ServerAddr value offers, in addition to the resolved TCP address
of the server, the original hostname provided to the driver. This is useful
when establishing TLS connections, to verify the hostname against the
Feature requested by Cory Mintz.
- Fixed value of the RoleUserAdminAny string constant.
Problem reported by Serhat Sevki Dincer.
gustavo @ http://niemeyer.net