Skip to content
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

Spring-data-redis - Keyspace events and cleaning indexes in Redis cluster [DATAREDIS-1229] #1789

Open
spring-projects-issues opened this issue Oct 9, 2020 · 1 comment
Assignees
Labels
type: bug A general bug

Comments

@spring-projects-issues
Copy link

Ajilkumar opened DATAREDIS-1229 and commented

Application is running with spring-boot 2.3.1 and lettuce 5.3.1 with Redis Cluster enabled.

On Startup application is subscribing to expired events to the master node on the Redis Cluster. Upon Key expiry application is receiving Key expired event through which Index records are removed. This is working fine for single application instance connected to single master/slave cluster setup.

Problems faced with multiple instances of the application with more than 1 master/slave setup:

  1. When multiple instances of the application is running, then all of them are subscribing to the expired event and all are getting expired Key notification. The first instance getting this notification is cleaning the index and Phantom copy for that key. But all other instances trying to do the same duplicate work even though records are already removed. 
  2. During runtime when there is a cluster topology change(i,e new master elected due to failover Or master added newly) application is not subscribing to the new master even though cluster topology refresh is enabled. Due to which expired events are not received from these masters and index records are orphaned without cleanup.

From the documentations we are seeing that enabling keyspace events with Redis Cluster is not recommended. But is there anyway to cleanup orphaned index records without subscribing to these events?


No further details from DATAREDIS-1229

@serac
Copy link

serac commented Sep 8, 2022

I believe this issue is related to #1612.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

No branches or pull requests

3 participants