mirror of
https://github.com/zitadel/zitadel.git
synced 2025-11-02 07:58:46 +00:00
perf(cache): use redis unlink for key deletion (#10658)
# Which Problems Are Solved
The usage of the Redis `DEL` command showed blocking and slowdowns
during load-tests.
# How the Problems Are Solved
Use [`UNLINK`](https://redis.io/docs/latest/commands/UNLINK/) instead.
# Additional Changes
- none
# Additional Context
- closes https://github.com/zitadel/zitadel/issues/8930
(cherry picked from commit a06ae2c835)
This commit is contained in:
committed by
Livio Spring
parent
5d3e01bb6e
commit
64bddb328c
6
internal/cache/connector/redis/_remove.lua
vendored
6
internal/cache/connector/redis/_remove.lua
vendored
@@ -3,8 +3,8 @@ local function remove(object_id)
|
||||
local keys = redis.call("SMEMBERS", setKey)
|
||||
local n = #keys
|
||||
for i = 1, n do
|
||||
redis.call("DEL", keys[i])
|
||||
redis.call("UNLINK", keys[i])
|
||||
end
|
||||
redis.call("DEL", setKey)
|
||||
redis.call("DEL", object_id)
|
||||
redis.call("UNLINK", setKey)
|
||||
redis.call("UNLINK", object_id)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user