Skip to content

Cache in RedisUtils is not thread safe #2884

Closed
@pete-woods

Description

@pete-woods

Affects Version(s): master


The LinkedHashMap in https://github.com/spring-projects/spring-integration/blob/master/spring-integration-redis/src/main/java/org/springframework/integration/redis/util/RedisUtils.java is accessed from multiple threads when using RedisLockRegistry, resulting in concurrency exceptions. I worked around the problem in my app by overriding the implementation there with one using Guava's cache. Spring integration doesn't have a dependency on Caffeine or Guava, or I'd have submitted a simple patch.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions