[CDRIVER-2594] Update docs for cursor_is_alive and consider deprecating Created: 05/Apr/18 Updated: 28/Oct/23 Resolved: 15/Apr/18 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 1.10.0 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Kevin Albertson | Assignee: | Kevin Albertson |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Description |
|
The docs for mongoc_cursor_is_alive say
The docs don't match the behavior. When the last batch is returned (with a cursor id of 0) we know we won't be contacting the server again, yet mongoc_cursor_is_alive will continue to return true (shown in this test). The current implementation is consistent with older behavior, so I don't think we should change it. However, we should update the documentation and consider deprecating it in favor of mongoc_cursor_more, which should behave the same (the done flag is set when the cursor id is 0 and there are no documents left in the last batch). As a sanity check, I replaced all calls of mongoc_cursor_is_alive with mongoc_cursor_more to verify tests passed. |
| Comments |
| Comment by Githook User [ 19/Apr/18 ] |
|
Author: {'email': 'kevin.albertson@10gen.com', 'username': 'kevinAlbs', 'name': 'Kevin Albertson'}Message: |
| Comment by Githook User [ 10/Apr/18 ] |
|
Author: {'email': 'kevin.albertson@10gen.com', 'name': 'Kevin Albertson', 'username': 'kevinAlbs'}Message: |