redis / redis-om-python

Object mapping, and more, for Redis and Python
MIT License
1.06k stars 108 forks source link

JsonModel query with many records with diferent expirations crashes find().sort_by().page() #584

Closed pantunes closed 2 months ago

pantunes commented 5 months ago

Hello, First of all great job with redis-om-python it's great!

I've been using it a lot lately, and I've stumbled into an issue.

I have a JsonModel which gets inserted many times a second, each entry is set to expire in 1 minute. Everything works good on insertion.

When I try to query this model using find().sort_by().page() everything works fine until the expirations start to kick in, so my assumption is that there is an issue when tries to return the data that in meantime expires.

There is no error but just hangs forever.

If I remove the expire() all works good.

Do you have any pointers?

SteniMariyaThomas commented 4 months ago

Experiencing same

slorello89 commented 3 months ago

@pantunes - what version of Redis / RediSearch / RedisJson are you using? I remember there being an old issue in RediSearch where some corner-cases would freeze connections - I wonder if you are tripping over that?

The other possibility is that there's some weird parsing /paging issues going on (when documents expire mid-query in Redis empty docs are returned).

Do you have some code that can reliably reproduce this?

slorello89 commented 2 months ago

Going to close this issue as it's gone a bit stale, feel free to reopen if you have further details!