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
Use 'scan' function, lost some key #65
Comments
I fix the bug in : asyncio_redis\cursors.py : change the if to while class Cursor:
@asyncio.coroutine
def fetchone(self):
"""
Coroutines that returns the next item.
It returns `None` after the last item.
"""
while not self._queue and not self._done:
yield from self._fetch_more()
if self._queue:
return self._queue.popleft() |
Thanks for reporting this issue and proposing a bug fix! |
I just faced the same bug and found that the above fix is correct. I inserted some print statements, and here is the trace of one of such cases:
|
And, I bump this issue to be fixed asap, because the result is undeterministic and unpredictable: this bug may appear or not appear on repetition of the same test codes, and does not raise explicit exceptions to the user. |
@jonathanslenders , I think the PR looks perfect. 👍 |
Ok :) It's merged. |
There are output:
p* total 70
pu:* total 0
pn:* total 64
k* total 1
k2* total 0
k3* total 0
sync* total 0
But, when I use redis lib,there are output:
p* total 70
pu:* total 3
pn:* total 64
k* total 3
k2* total 1
k3* total 1
sync* total 1
The text was updated successfully, but these errors were encountered: