zitadel/internal/cache
Tim Möhlmann ee7beca61f
fix(cache): ignore NOSCRIPT errors in redis circuit breaker (#9022)
# Which Problems Are Solved

When Zitadel starts the first time with a configured Redis cache, the
circuit break would open on the first requests, with no explanatory
error and only log-lines explaining the state of the Circuit breaker.

Using a debugger, `NOSCRIPT No matching script. Please use EVAL.` was
found the be passed to `Limiter.ReportResult`. This error is actually
retried by go-redis after a
[`Script.Run`](https://pkg.go.dev/github.com/redis/go-redis/v9@v9.7.0#Script.Run):

> Run optimistically uses EVALSHA to run the script. If script does not
exist it is retried using EVAL.

# How the Problems Are Solved

Add the `NOSCRIPT` error prefix to the whitelist.

# Additional Changes

- none

# Additional Context

- Introduced in: https://github.com/zitadel/zitadel/pull/8890
- Workaround for: https://github.com/redis/go-redis/issues/3203
2024-12-09 08:20:21 +00:00
..
connector fix(cache): ignore NOSCRIPT errors in redis circuit breaker (#9022) 2024-12-09 08:20:21 +00:00
cache.go feat(cache): organization (#8903) 2024-11-21 08:05:03 +02:00
connector_enumer.go feat(cache): redis cache (#8822) 2024-11-04 10:44:51 +00:00
error.go feat(storage): generic cache interface (#8628) 2024-09-25 21:40:21 +02:00
pruner_test.go feat(cache): redis cache (#8822) 2024-11-04 10:44:51 +00:00
pruner.go feat(cache): redis cache (#8822) 2024-11-04 10:44:51 +00:00
purpose_enumer.go feat(cache): organization (#8903) 2024-11-21 08:05:03 +02:00