Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Enable Synapse to connect to redis logical DB #15009

Closed
999lakhisidhu opened this issue Feb 7, 2023 · 5 comments · Fixed by #15034
Closed

Enable Synapse to connect to redis logical DB #15009

999lakhisidhu opened this issue Feb 7, 2023 · 5 comments · Fixed by #15034
Labels
O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Minor Blocks non-critical functionality, workarounds exist. T-Enhancement New features, changes in functionality, improvements in performance, or user-facing enhancements.

Comments

@999lakhisidhu
Copy link
Contributor

Currently for Redis Database for distributed deployment (with workers). The available config option are redis host, port, there is no option in configuration to specify logical redis DB. The dependency synapse is using "txredisapi" does support the connection to a logical redis DB. Is it possible to enable the same in Synapse configuration?

@clokep clokep added S-Minor Blocks non-critical functionality, workarounds exist. T-Enhancement New features, changes in functionality, improvements in performance, or user-facing enhancements. O-Uncommon Most users are unlikely to come across this or unexpected workflow labels Feb 7, 2023
@clokep
Copy link
Member

clokep commented Feb 7, 2023

That sounds reasonable -- we would certainly accept a patch adding support for this. It should just be threading through the new configuration with a default to whatever happens if you don't provide it.

@waclaw66
Copy link

@999lakhisidhu: https://redis.io/docs/manual/pubsub/
Pub/Sub has no relation to the key space. It was made to not interfere with it on any level, including database numbers.

@999lakhisidhu
Copy link
Contributor Author

@waclaw66 I agree for pub/sub it may not matter, if you are connecting with a logical keyspace or normal connection but here we are storing some key,value pairs as well(i have observed it in redis db connected to synapse)… so these key, values can be segregated as per logical db..

@waclaw66
Copy link

waclaw66 commented Feb 11, 2023

i have observed it in redis db connected to synapse)… so these key, values can be segregated as per logical db..

I haven't seen any key-value in redis. What kind of data are stored there?

@999lakhisidhu
Copy link
Contributor Author

`[test@cloud]$ redis-cli -h localhost -p 6379 -n 3
localhost:6379[3]> keys *

  1. "cache_v1:event_to_prev_state_group:$1tpX6kQNwghBprqdpVCCU7PMK9brZPbeCZfV2TFM664"
  2. "cache_v1:event_to_prev_state_group:$Cr35pecVCiC43-IjNqFtWIFUblXU0-cTAwnOUAc6JD4"
  3. "cache_v1:get_joined_hosts:23"
  4. "cache_v1:event_to_prev_state_group:$KaqNr2RybuLz9uxmAMBSsI2gTVP1cMD1WLs78ShIFIs"
  5. "cache_v1:event_to_prev_state_group:$bmw-x_N4HJQlrBvOs8ct_hpzxFL-Ue6hO535DjnYhmA"
    localhost:6379[3]> GET "cache_v1:event_to_prev_state_group:$Cr35pecVCiC43-IjNqFtWIFUblXU0-cTAwnOUAc6JD4"
    "23"
    localhost:6379[3]>
    `
    @waclaw66 this is the snapshot for key,value pairs stored in redis DB

@clokep clokep linked a pull request Feb 15, 2023 that will close this issue
4 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Minor Blocks non-critical functionality, workarounds exist. T-Enhancement New features, changes in functionality, improvements in performance, or user-facing enhancements.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants