BenLubar
BenLubar

Reputation: 403

MongoDB "Cursor not found" even with no-timeout

Reported here, but I was told to post on StackOverflow

I'm trying to read the users from a forum database. Eventually, I want to put the data into PostgreSQL, but for now it just discards the data after reading it. My code is here.

The database is being told not to expire the cursor here, which calls this function, which sets no-timeout.

However, I'm getting an error here that says Cursor not found, cursor id: 28781399268 (the numbers change on every run) after going through about 96k of the 141k users.

Upvotes: 6

Views: 2197

Answers (1)

BenLubar
BenLubar

Reputation: 403

It turns out the Go MongoDB driver has a bug. I've submitted a fix here: https://github.com/go-mgo/mgo/pull/295

It was setting the NoCursorTimeout flag on the wire message, but not the noCursorTimeout property on the query.

Upvotes: 4

Related Questions