[ANN] mgo r2013.11.18

371 views
Skip to first unread message

Gustavo Niemeyer

unread,
Nov 18, 2013, 6:06:31 PM11/18/13
to golan...@googlegroups.com, mongod...@googlegroups.com, mgo-...@googlegroups.com
The low-impact release r2013.11.18 of the mgo MongoDB driver
for Go has just been tagged.

For details, the driver page lives at: http://labix.org/mgo

And these are the minor features and fixes made in this release:

- Added support for maps with custom string key types. This enables
mgo to properly handle types such as map[MyString]MyType.
Feature requested by Emre Kazdagli.

- Added Query.DisableCursorTimeout method, to ask the server to
not apply the default 10-minutes timeout on specific operations.
Feature requested by Ali Sufian.

- Properly handle elements with custom slices of bson.Raw.
Problem reported by Daniel Gottlieb.

- In the implementation of mgo/bson, don't trust the unspecified
expression evaluation order of a specific expression, so that
both gccgo and gc are happy with the logic.
Problem reported and fixed by Michael Hudson.

- Fixed socket timeout logic for inactive sockets. The problem was
reported by Rangel Reale, and was published as a hot fix very
shortly after the prior release, since it was critical bug that
prevented the release from being used properly. Mentioned here
just for documentation purposes, and for proper credit.


gustavo @ http://niemeyer.net

Gustavo Niemeyer

unread,
Nov 19, 2013, 5:07:18 PM11/19/13
to golan...@googlegroups.com, mongod...@googlegroups.com, mgo-...@googlegroups.com
On Mon, Nov 18, 2013 at 9:06 PM, Gustavo Niemeyer <gus...@niemeyer.net> wrote:
> - Added Query.DisableCursorTimeout method, to ask the server to
> not apply the default 10-minutes timeout on specific operations.
> Feature requested by Ali Sufian.

Please hold off adopting that new method. While reading notes for
what we have to implement for supporting the upcoming MongoDB release,
it occurred to me that we can merge two different features in a more
elegant API. I'll send a note shortly with an update.


gustavo @ http://niemeyer.net

Gustavo Niemeyer

unread,
Nov 19, 2013, 6:31:36 PM11/19/13
to golan...@googlegroups.com, mongod...@googlegroups.com, mgo-...@googlegroups.com
Done. Disabling the cursor timeout is now done via Session.SetCursorTimeout:

http://labix.org/v2/mgo#Session.SetCursorTimeout

It takes a time.Duration as an argument, and only accepts zero right
now, to disable the timeout. This is a better API both because it sits
next to SetSocketTimeout and SetSyncTimeout, with the same parameter,
and also because it opens the door for non-zero durations, which is
hopefully coming at some point.

Sorry for the last minute change.
--

gustavo @ http://niemeyer.net

alis...@gmail.com

unread,
Nov 20, 2013, 12:59:08 AM11/20/13
to golan...@googlegroups.com, mongod...@googlegroups.com, mgo-...@googlegroups.com
Thanks Gustavo. This is definitely a better approach.
Reply all
Reply to author
Forward
0 new messages