[RubyDriver] Limit limited to int32

19 views
Skip to first unread message

Szymon Kieloch

unread,
Apr 22, 2016, 3:23:56 AM4/22/16
to mongodb-user
Hi guys,

I have an interesting thing in the ruby driver: https://github.com/mongodb/mongo-ruby-driver

Recently I discover that I would like to use this int: 1461061850497 as a limit to my collection, but unfortunately it cannot be processed, as it is int64, not int32. Could you tell me if someone stuck upon this issue? What do you think about upgrading field's definition to int64?

Stephen Steneker

unread,
Apr 22, 2016, 3:40:41 AM4/22/16
to mongodb-user

Hi Szymon,

This matches the supported values for a cursor limit: https://docs.mongodb.org/manual/reference/method/cursor.limit/#behavior.

If you really need a larger limit for query results, you can leave the limit unset (which defaults to 0, or unlimited) .. or explicitly set the limit to 0.

To be clear, the limit here is specifically in relation to documents returned by a query cursor and does not infer any server-side limitations on number of documents that can be saved in a collection.

If you are still stuck on this issue, can you clarify what you are trying to achieve with the limit of ~1.4 trillion documents?

Regards,
Stephen

Reply all
Reply to author
Forward
0 new messages