-
Notifications
You must be signed in to change notification settings - Fork 624
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot scan when query is reused and iterator is closed without reading all items #1445
Comments
I have reproduced this on the provided version. After I tried to run the provided code on the current version I encountered endless recursion if we don't reset the query @joao-r-reis Is it desired state when we fall into recursion if we don't reset |
This looks somewhat related to #1447 #1508 #1511 #1229 There's currently an open PR to change the Query/Batch API so that Query and Batch objects can be reused but I think this has a bit of a different scope to this current issue (#1445). As far as I understand there shouldn't be a bug with the current paging implementation, I think the issue here is that a new |
The recursion appeared in that one. |
Yes, I believe this should be closed as it looks like API misuse |
My earlier reply mentions manual paging but even without setting the page state manually it should work fine without recursion. If you use a single Iter object and call |
Yes. I've created
If I understood correctly, and it means creating new |
What version of Cassandra are you using?
Scylla 4.0
What version of Gocql are you using?
v0.0.0-20200519160334-799061058e31
What did you do?
What did you expect to see?
No error
What did you see instead?
In this example we fill table with 1k items, set page size to 10 and try to always read first 12 items.
If query is reused after reading 600 items it breaks.
Changing page size changes when it breaks but it always breaks.
Typical tail of test
Creating new query for each iterator works fine.
The text was updated successfully, but these errors were encountered: