We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1d9077d commit 12a8adcCopy full SHA for 12a8adc
cassandra/cluster.py
@@ -5141,6 +5141,11 @@ def next(self):
5141
if not self.response_future._continuous_paging_session:
5142
self.fetch_next_page()
5143
self._page_iter = iter(self._current_rows)
5144
+
5145
+ # Some servers can return empty pages in this case; Scylla is known to do
5146
+ # so in some circumstances. Guard against this by recursing to handle
5147
+ # the next(iter) call. If we have an empty page in that case it will
5148
+ # get handled by the StopIteration handler when we recurse.
5149
return self.next()
5150
5151
return next(self._page_iter)
0 commit comments