-
Notifications
You must be signed in to change notification settings - Fork 40.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@Around Aspect is Inconsistently Intercepting When Execution Invoked by Multiple Threads(~25+) #43206
Comments
Could you please share a sample to reproduce an issue? At the moment it is quite difficult to help you. https://github.com/spring-projects/spring-boot/wiki/How-To-Get-Help#defining-the-problem |
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed. |
Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue. |
Running Spring Boot 3.2.5.
Using org.springframework.spring-aspects
While Using org.aspectj.lang.annotation.Around we noticed in consistency when using multi threads for invoking a method expected to be get into the aspect. We are using a
@around("execution(* org.springframework.web.client.RestTemplate.*(..))")
ExecutorService executor;
executor = Executors.newFixedThreadPool(50);
..
future.get(); // Inconsistency shows at some cases, expected http enrichments made by the Aspect are not added. After checking we saw that in some cases, the RestTemplate exchange method is not intercepted by the Aspect.
This is while in some cases, for the the same argument (same exchange invocations), there are no issues at all, and all exchange calls are intercepted and headers are enriched with required values.
The text was updated successfully, but these errors were encountered: