(Redis) Unable to claim messages after some messages expired
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
zaqar |
Fix Released
|
High
|
Eva Balycheva |
Bug Description
How to reproduce:
1. Post some messages
2. Wait for them to expire
3. (optional) You can post some more messages if you wish, it doesn't matter.
4. Try to claim messages. You'll get the error 503 on the client, and on the server you'll get:
ResponseError: Error running script (call to f_f8726c7ad2f32
Why it happens:
Redis can automatically expire top-level keys. We ask Redis to expire our top-level keys after some time: <claim id> or <message id> and Redis cleans them wonderfully.
However, there are also these top-level keys:
1. <project_
2. <project_
And these are not cleaned. Nor Zaqar, nor Redis wipes out expired ids from these sets.
So claim_messages.lua script grabs message ids from <project_
https:/
Then it takes first grabbed message id and tries to get two field values of corresponding <message id> key:
https:/
In case <message id> key was already expired and cleaned by Redis, this function returns [nil, nil] instead of [claim id, expiration date number].
So this condition fails, because it can't be evaluated: https:/
Possible solution:
Because it's impossible to make Redis auto expire row in a set (See https:/
Note: should also include expiration date in each row of <project_
summary: |
- (Redis) Unable to claim messages after some messages have expired + (Redis) Unable to claim messages after some messages expired |
description: | updated |
description: | updated |
Changed in zaqar: | |
importance: | Undecided → High |
Changed in zaqar: | |
assignee: | nobody → Eva Balycheva (ubershy) |
the ttl doesn't work in redis backend. So it leads a series of bugs. I think we should first find a sutiable way to solve the bug: /review. openstack. org/#/c/ 276548/ . Then other bugs, like this one, will be fixed easily.
https:/