Mhanna Abu Tareef created CASSJAVA-111:
------------------------------------------

             Summary: driver doesn't move to next page
                 Key: CASSJAVA-111
                 URL: https://issues.apache.org/jira/browse/CASSJAVA-111
             Project: Apache Cassandra Java driver
          Issue Type: Bug
            Reporter: Mhanna Abu Tareef


Hi,

Looking at com/datastax/oss/driver/internal/core/cql/MultiPageResultSet.java

    private void maybeMoveToNextPage() {
      if (!currentRows.hasNext() && currentPage.hasMorePages()) {
        BlockingOperation.checkNotDriverThread();
        AsyncResultSet nextPage =
            CompletableFutures.getUninterruptibly(currentPage.fetchNextPage());
        currentPage = nextPage;
        remaining += nextPage.remaining();
        currentRows = nextPage.currentPage().iterator();
        executionInfos.add(nextPage.getExecutionInfo());
        // The definitions can change from page to page if this result set was 
built from a bound
        // 'SELECT *', and the schema was altered.
        columnDefinitions = nextPage.getColumnDefinitions();
      }
    }

Patching this class by changing the "if" to "while" resolved an issue where a 
query returns empty while there're rows



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to