Skip to content
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

TypeError: 'NoneType' object is not subscriptable on search query #2436

Closed
vampolo opened this issue Oct 27, 2022 · 1 comment
Closed

TypeError: 'NoneType' object is not subscriptable on search query #2436

vampolo opened this issue Oct 27, 2022 · 1 comment

Comments

@vampolo
Copy link

vampolo commented Oct 27, 2022

Version
python redis 4.1.2 and redis server 6.2.6 with redissearch 2.4.11 and redisJSON 2.2.0

Platform
redislab.com running on GCP

Description:

I think I found a race condition in the library. The use case is not common and that's probably why does not happen often.
I have a Redis search + Redis JSON cluster that keeps adding/removing documents to the index. So it might be that documents get removed while the query is being performed.
This is the stack trace I receive which shows a query that should have returned 2 documents, but the documents are none, this is probably because the documents where removed while the query was being performed

image

this seems to be a problem with redis-py that is not doing a null check in that map, but can also be a Redis Enterprise bug that is returning 2 total results. I have notified them about this problem as well. But I think that redis-py should account for this case regardless.

@dvora-h
Copy link
Collaborator

dvora-h commented Oct 29, 2022

@vampolo Thanks for reporting this!
We have already encountered this problem and fixed it here #2270
The fix is included in version 4.4.0-rc1 which we will hopefully release soon as a stable (4.4.0) version.

@dvora-h dvora-h closed this as completed Oct 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants