Comments (5)
The message you've shared mentions:
As you've noticed, using a ReentrantLock per node would add
unacceptable overhead, and would be especially unwelcome for the huge
number of non-loom usages.
Isn't this going to be a huge performance drawback for everyone here?
Also, another message in the thread points to the fact that the Javadoc explicitly says that "Some attempted update operations on this map by other threads may be blocked while computation is in progress, so the computation should be short and simple."
Doesn't this mean that the pinning is very short because computation should be very short?
In my opinion, we should wait for the JDK team and not work on a sub-optimal solution in this case.
from spring-framework.
Isn't this going to be a huge performance drawback for everyone here?
That really depends on the use case of ConcurrentHashMap
in AdvisedSupport
. From what I see(but I'm not a Spring guru in any way) - that map is a method cache and will be populated quite quickly. After that mapping function won't be called ever.
I don't see usage of ReadWriteLock
as sub-optimal, unless there are real drawback to it.
If this possible, then it will allow Spring to be fully VT compatible now and not somewhere in the future.
from spring-framework.
In some locations, we perform independent get/put steps against a ConcurrentHashMap
instead of calling computeIfAbsent
, accepting potential concurrent recomputation. Ironically we used to do this in AdvisedSupport
before 6.1 and then accepted a PR that turned it into computeIfAbsent
... I'm inclined to change that part back to independent get/put steps, assuming that this has no drawback since we used to do this for two decades. I suppose this would avoid the thread pinning that you are seeing?
from spring-framework.
@jhoeller I guess so - it looks like computeIfAbsent
is the one to blame here.
from spring-framework.
Alright, I'll revise this as a concurrency performance regression for 6.1.9 then. It is effectively a regression since 6.0.x and 5.3.x do not show that effect, and it's also an inconsistency with the shared cache code path in AdvisedSupport
that we introduced in 6.1 (where we do separate read/write steps against the volatile cachedInterceptors
field).
from spring-framework.
Related Issues (20)
- `@TestBean` factory method not found in multi-level `@Nested` hierarchy
- Exception mapping does not work as expected when plugging in ReactorNettyClientRequestFactory into RestTemplate and RestClient HOT 3
- Allow json content to be converted using AssertJ's AssertFactory
- ClassPathScanningCandidateComponentProvider does not work when the app started in native-image HOT 1
- @CacheEvict condition uses wrapper comparison instead of actual objects HOT 1
- The variable decorated is repeatedly named in the builder() method of WebHttpHandlerBuilder HOT 1
- Spring doubles backslash characters when loading maven property in application.yml leading to StringUtils.cleanPath issues HOT 1
- HttpServletResponse for REQUEST dispatcher is wrapped in async wrapper. HOT 9
- @Valid annotations on container elements for handler argument validation not supported
- NamedParameterJdbcTemplate execute complex Insert Query Fails HOT 1
- Add missing hints for Hibernate `@TenantId`
- @Transactional(noRollbackFor) is not respected when calling JpaRepository.save method HOT 5
- AspectJ CTW aspects executed twice HOT 5
- Bean override factory post processing doesn't work with `FactoryBean`
- Jaxb2XmlEncoder can not encode JAXBElement HOT 2
- AspectJ CTW aspects executed twice HOT 1
- AspectJ CTW aspects executed twice HOT 1
- Add support for the HTTP QUERY method HOT 4
- Spring Cloud Gateway Webflux: I want to get the connection remote address HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spring-framework.