[GODRIVER-490] Cursor.Next should call getMore in a loop until a document is available Created: 13/Jul/18 Updated: 28/Oct/23 Resolved: 13/Sep/18 |
|
| Status: | Closed |
| Project: | Go Driver |
| Component/s: | CRUD |
| Affects Version/s: | 0.0.9 |
| Fix Version/s: | 0.0.14 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Kristofer Brandow (Inactive) | Assignee: | Matthew Chiaravalloti |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | newgrad | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Description |
|
Fix how tailable cursors work. For context: In particular, Cursor.Next should return false iff
Otherwise, it should call the getMore command in a loop until at least one document is returned in the next batch. Note: this should be done for all cursors, not just tailable. There's nothing in the wire protocol contract that says the server can't return an empty batch with a non-zero cursorId. Also, consider that the initiating command (e.g. find, aggregate) can return an empty first batch. |
| Comments |
| Comment by Githook User [ 13/Sep/18 ] |
|
Author: {'name': 'Matthew Chiaravalloti', 'email': 'matthew.chiaravalloti@mongodb.com', 'username': 'mattChiaravalloti'}Message: Update Cursor.Next to call getMore in a loop Change-Id: Id6538bb914a7538781c8270d323efd572033ca3f |