[ANN] mgo r2014.01.25

451 views
Skip to first unread message

Gustavo Niemeyer

unread,
Jan 25, 2014, 1:33:06 PM1/25/14
to golan...@googlegroups.com, mongod...@googlegroups.com, mgo-...@googlegroups.com
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.

Documentation at:

http://labix.org/v2/mgo#DialInfo


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

Documentation at:

http://labix.org/v2/mgo/txn#Runner.PurgeMissing


- 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
server certificate.

Feature requested by Cory Mintz.

Documentation at:

http://labix.org/v2/mgo#DialInfo
http://labix.org/v2/mgo#ServerAddr


- Fixed value of the RoleUserAdminAny string constant.

Problem reported by Serhat Sevki Dincer.


gustavo @ http://niemeyer.net

Evan Shaw

unread,
Jan 25, 2014, 2:57:01 PM1/25/14
to mgo-...@googlegroups.com
I'm a little disappointed that these bugs remain unaddressed:

https://bugs.launchpad.net/mgo/+bug/1269949
https://bugs.launchpad.net/mgo/+bug/1269952
https://bugs.launchpad.net/mgo/+bug/1269953

I think I provided enough detail that they could be easily fixed. Is
there a better way to report bugs?
> --
> You received this message because you are subscribed to the Google Groups "mgo-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to mgo-users+...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

Gustavo Niemeyer

unread,
Jan 25, 2014, 4:07:20 PM1/25/14
to mgo-...@googlegroups.com


The tracker is a fine way to report these issues, Evan. Thanks!

But if you have something worth of immediate attention, please mail this list, as I can easily cut a release without addressing issues reported last week.

On the bright side, it's easy to push these changes sooner rather than later.

Gustavo Niemeyer

unread,
Jan 25, 2014, 7:05:53 PM1/25/14
to mgo-...@googlegroups.com
On Sat, Jan 25, 2014 at 5:57 PM, Evan Shaw <eds...@gmail.com> wrote:
> I'm a little disappointed that these bugs remain unaddressed:
>
> https://bugs.launchpad.net/mgo/+bug/1269949
> https://bugs.launchpad.net/mgo/+bug/1269952
> https://bugs.launchpad.net/mgo/+bug/1269953

These issues were quite straightforward, so I've fixed them and
already made the fixes public in the repository. I'll give you credit
in the next announcement.

Thanks again, Evan.


gustavo @ http://niemeyer.net

Evan Shaw

unread,
Jan 25, 2014, 7:59:33 PM1/25/14
to mgo-...@googlegroups.com
Thanks, Gustavo!
Reply all
Reply to author
Forward
0 new messages