{{ message }}
ResultSet: handle empty non-final pages on ResultSet iteration#102
Merged
Conversation
This commit provides a fix to the situation when iterating on a ResultSet, the driver aborts the iteration if the server returns an empty page even if there are next pages available. Python driver is affected by the same problem as JAVA-2934 This fix is similar to apache/cassandra-java-driver#1544
fruch
reviewed
Aug 30, 2021
There was a problem hiding this comment.
@ultrabug this is identical to the next line after the if, how this fixes anything ?, do we have a test case to demonstrate this ?
There was a problem hiding this comment.
It's not doing the same. It runs the whole method again (recursively). next(self) not only calls next(self._page_iter) but also has all the logic in lines 5127-5137.
|
Would it be inappropriate to ask for a unit test? |
Collaborator
Author
|
Thanks @fruch
I'll try to add this on a second PR okay, first of all I need to make sure the current tests do fail because paging is supposed to be tested already... |
ultrabug
added a commit
that referenced
this pull request
Aug 30, 2021
fruch
pushed a commit
that referenced
this pull request
Nov 21, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

This commit provides a fix to the situation when iterating on a
ResultSet, the driver aborts the iteration if the server returns
an empty page even if there are next pages available.
Python driver is affected by the same problem as JAVA-2934
This fix is similar to apache/cassandra-java-driver#1544