bbangert / beaker

WSGI middleware for sessions and caching
https://beaker.readthedocs.org/
Other
517 stars 147 forks source link

Add support of redis clusters #236

Closed Millefeuille42 closed 5 months ago

Millefeuille42 commented 5 months ago

Add Redis cluster support as session management backend. Fixing #235.

amol- commented 5 months ago

Good, much better. Could you please also add a testsuite for rediscluster? You can copy it from test_ext_redis.py and replace ext:redis with ext:rediscluster

Millefeuille42 commented 5 months ago

Done !

amol- commented 4 months ago

@Millefeuille42 are you aware of any way to test redis cluster in GitHub Actions? The newly added tests for cluster are failing because the target redis node is not started in cluster mode, see https://github.com/bbangert/beaker/actions/runs/8556636486/job/23446940757#step:12:261

Millefeuille42 commented 4 months ago

I think you can refer to something like this https://github.com/vishnudxb/redis-cluster which seems to provide a standard redis cluster. Unfortunately I have low exp on github actions, could help with how to deploy a redis cluster, but I am not sure about how to integrate it to github actions

amol- commented 4 months ago

@Millefeuille42 nice, the testsuite correctly runs with the action that you suggested. But the tests have shown that the current implementation is actually broken, the Synchronizer does not work due to lack of transactions in the redist cluster: https://github.com/bbangert/beaker/actions/runs/8575910114/job/23505874987#step:14:270

Are you aware of a best practice to implement atomic lock release in redis cluster? See https://github.com/bbangert/beaker/blob/master/beaker/ext/redisnm.py#L125-L132

amol- commented 4 months ago

Lock on cluster has been fixed in https://github.com/bbangert/beaker/pull/238