spring-cloud / spring-cloud/spring-cloud-openfeign
Cache get error handler execute twice
Open
@OlgaMaciaszek is already working on this.
Since Feb 25, 2022.
bug
- Dominant language
- Java
- Stars
- 1.3k
- Forks
- 838
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 13
Description
Describe the bug
During getting elements from cache, annotated by @Cacheable on FeignClient, cache get error handler execute twice.
It looks like it is caused by change https://github.com/spring-cloud/spring-cloud-openfeign/pull/608. The flow seems to be as follows:
-> CacheInterceptor
-> CacheAspectSupport#execute:402 (findCachedItem)
-> handleCacheGetError
-> CacheAspectSupport#execute:421 (invokeOperation)
-> FeignCachingInvocationHandlerFactory#create:53 (cacheInterceptor.invoke)
-> CacheAspectSupport#execute:402 (findCachedItem)
-> handleCacheGetError
Affected spring cloud version: 2021.0.0
Sample
Sample application that reproduces the problem: https://github.com/fureq/spring-feign-bug. Details are described in readme.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.