-
Type: Bug
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: 2.4.10, 2.6.3
-
Component/s: Querying
-
None
-
ALL
To reproduce, run setup(), then run reindex() and count() in parallel:
var n = 1000 function setup() { db.c.drop() for (var i=0; i<n; i++) db.c.insert({_id:i, x:i}) db.getLastError() } function reindex() { for (;;) { db.c.reIndex() sleep(1) } } function count() { for (;;) { var nn = db.c.find().hint({_id:1}).batchSize(n).itcount() if (n != nn) print('expected', n, 'got', nn) } }
- As written above, with a large enough batchsize to avoid getmore, when the query yields it finishes without error and returns only a subset of the documents (which is always one less than a multiple of 128, the unit of work for yielding). If the query is not able to return full results it should return an error.
- If the code is modified to use a small batch size so that getmores occurs, the query errors out with a CursorNotFound, which is acceptable.
- duplicates
-
SERVER-2454 Queries that are killed during a yield should return error to user instead of partial result set
- Closed