Skip to content

Commit 3191a58

Browse files
committed
Properly handle empty pages in MultiPageResultSet
If there are multiple empty pages consecutively, the old logic did not handle the situation correctly. Use a while loop to move past many possible empty pages. (cherry picked from commit 40da47a)
1 parent a04fadf commit 3191a58

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/main/java/com/datastax/oss/driver/internal/core/cql/MultiPageResultSet.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ protected Row computeNext() {
9393
}
9494

9595
private void maybeMoveToNextPage() {
96-
if (!currentRows.hasNext() && currentPage.hasMorePages()) {
96+
while (!currentRows.hasNext() && currentPage.hasMorePages()) {
9797
BlockingOperation.checkNotDriverThread();
9898
AsyncResultSet nextPage =
9999
CompletableFutures.getUninterruptibly(currentPage.fetchNextPage());

0 commit comments

Comments
 (0)