Skip to content

DefaultRedisCacheWriter.clean() uses blocking KEYS command [DATAREDIS-1151] #1721

Closed
@spring-projects-issues

Description

@spring-projects-issues

eyison opened DATAREDIS-1151 and commented

when I use clean method in class DefaultRedisCacheWriter ,it will excute keys command which is block,it may take a lot of time and cause other commands time out


Affects: 2.1.17 (Lovelace SR17), 2.2.7 (Moore SR7), 2.3 GA (Neumann)

Reference URL:

byte[][] keys = Optional.ofNullable(connection.keys(pattern)).orElse(Collections.emptySet())

Issue Links:

  • DATAREDIS-1113 Use SCAN instead KEYS when clean cache
    ("is duplicated by")
  • DATAREDIS-1176 org.springframework.data.redis.cache.DefaultRedisCacheWriter#clean method may ruin performance
    ("is duplicated by")
  • DATAREDIS-1152 change clean method keys command to scan in DefaultRedisCacheWriter
    ("is duplicated by")

Referenced from: pull request #532

1 votes, 4 watchers

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions