You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "tengu-alt (via GitHub)" <gi...@apache.org> on 2025/01/21 14:46:48 UTC
Re: [I] Cannot scan when query is reused and iterator is closed without reading all items [cassandra-gocql-driver]
tengu-alt commented on issue #1445:
URL: https://github.com/apache/cassandra-gocql-driver/issues/1445#issuecomment-2604936045
I have reproduced this on the provided version.
That happens because `PageSize` and amount of iterations are not equal. After we get the first 10 items - `Scan()` returns a new `Iter`, which we use for getting the rest 2 items. After that, the new `Iter` is created (with a new paging state) and we skip the remaining 8 items. That explains why we got only 600 elements in the result instead of 1000.
I have set the for loop for `i < 14` and got 700 elements in the result.
After I tried to run the provided code on the current version I encountered endless recursion if we don't reset the query `PageState` manually after each iteration.
@joao-r-reis Is it desired state when we fall into recursion if we don't reset page size manually? Or is it a bug that needs to be fixed?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org