Details
-
Bug
-
Resolution: Done
-
Major - P3
-
None
-
0.25
Description
The documentation says that batchSize is a non-negative integer but an error is thrown if batchSize (/ limit) is 0
https://docs.mongodb.com/manual/reference/command/getMore/
client = Mongo::Client.new(["localhost:27017"]) |
102.times do |i| |
client[:test].insert_one(a: i) |
end
|
client[:test].find({}, limit: 0).to_a |
|
|
DEBUG -- : MONGODB | localhost:27017 | admin.find | STARTED | {"find"=>"test", "filter"=>{}, "limit"=>0} |
DEBUG -- : MONGODB | localhost:27017 | admin.find | SUCCEEDED | 0.0021939999999999998s |
DEBUG -- : MONGODB | localhost:27017 | admin.getMore | STARTED | {"getMore"=>15001859357, "collection"=>"test", "batchSize"=>0} |
DEBUG -- : MONGODB | localhost:27017 | admin.getMore | FAILED | Batch size for getMore must be positive, but received: 0 (2) | 0.00036199999999999996s |
Mongo::Error::OperationFailure: Batch size for getMore must be positive, but received: 0 (2) |
from /Users/emily/Code/driver/mongo-ruby-driver/lib/mongo/operation/result.rb:256:in `validate!' |
Attachments
Issue Links
- is related to
-
RUBY-1147 Error when sending getMore command on 3.2 and limit or batchSize is 0
-
- Closed
-