Skip to content
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

Avoid multiple volatile reads/writes in a row where only one is enough #25899

Merged
merged 1 commit into from
Nov 5, 2020

Conversation

stsypanov
Copy link
Contributor

  • in MethodInvocationProceedingJoinPoint use the same approach as in InjectionPoint.getAnnotations() to do only one volatile read for all calls after field initialization instead of two.
  • in AutowiredAnnotationBeanPostProcessor we are guareded by synchronized
  • AbstractCacheManager newly created LinkedHashSet always has some extra capacity, so calculation of it's size +1 is redundant

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Oct 12, 2020
@jhoeller jhoeller self-assigned this Nov 5, 2020
@jhoeller jhoeller added in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Nov 5, 2020
@jhoeller jhoeller added this to the 5.3.1 milestone Nov 5, 2020
@jhoeller jhoeller merged commit e1f51b4 into spring-projects:master Nov 5, 2020
@stsypanov stsypanov deleted the volat branch November 10, 2020 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants