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

Keyspace Events in Redis Cluster get lost [DATAREDIS-534]

Open
#1,111 3 comments 5 reactions 1 assignee View on GitHub

@christophstrobl is already working on this.

Since Dec 30, 2020.

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

Description

Mark Paluch opened DATAREDIS-534 and commented

Keyspace notifications in Redis Cluster are published only to the local node (see https://github.com/antirez/redis/issues/2541. Keyspace notifications are not broadcasted to all nodes).

Spring Data Redis subscribes only to one (random) node and so the expiry event may be received but that depends on which node the subscription resides and on which cluster node a key expired.

The recommended workaround is to:

  1. Subscribe to all master nodes
  2. Periodically check for topology changes
  3. Handle (merge) events on the client

Affects: 1.7.2 (Hopper SR2)

Issue Links:

  • DATAREDIS-1123 Clustered Redis keyspace notifications are only received from one node in a cluster
    ("is duplicated by")
  • DATAREDIS-1213 Spring-data-redis - Not subscribing to all master nodes
    ("is duplicated by")

2 votes, 3 watchers

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.