-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Support for redis-cluster
#23869
Comments
Could you paste your configuration and redis cluster information here? |
I just used the default config of the bitnami chart. Important: I used the latest v6 redis (chart: release 7.6.4) as the v7 has some compatibility issues with the underlying Debian image and runs into another issue (unrelated to Gitea). |
You can modify your redis conn string in your Gitea config , add a "prefix" with slot, then |
See the possible configuration connection string https://github.com/go-gitea/gitea/blob/main/modules/nosql/redis.go#L18-L22 |
The "prefix" option is not documented, but cluster needs it. Make it |
Tangentially related: There is also |
To fix the problem, either:
|
I came across this while testing |
Can you try this PR: Use Get/Set instead of Rename when Regenerate session id #23975 ? |
Not as a PR as I would need an image to test it with the Helm chart. |
Approve and merge, then get a dev image? |
It should be a bug rather than a feature because we have already supports redis cluster. |
Do not use Rename here, because the old sid and new sid may be in different redis cluster slot. Fix #23869
) Do not use Rename here, because the old sid and new sid may be in different redis cluster slot. Fix go-gitea#23869
…3983) Backport #23975 by @wxiaoguang Do not use Rename here, because the old sid and new sid may be in different redis cluster slot. Fix #23869 Co-authored-by: wxiaoguang <[email protected]>
This PR together with #24114 resulted in a successful connection to a |
Feature Description
Using Gitea with
redis-cluster
seems not possible as of right now.When attempting so, the following error is thrown by Gitea
This is a unique behavior of
redis-cluster
compared to a singleredis
installation and must be accounted for on the client side as described in https://dzone.com/articles/resolved-crossslot-keys-error-in-redis-cluster-mod.I can't infer if this would be a simple addition or a breaking change but wanted to drop the information about
redis-cluster
anyhow as I couldn't find a prior discussion about it.Screenshots
No response
The text was updated successfully, but these errors were encountered: