spring-projects / spring-projects/spring-data-redis

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

Open
#1,789 1 comment 0 reactions 1 assignee View on GitHub

@christophstrobl is already working on this.

Since Dec 30, 2020.

type: bug
Dominant language
Java
Stars
1.9k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.