-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Concurrency issue with DeserializerCache (due to Map
deserializers not getting cached)
#604
Comments
There are no known open issues regarding concurrency or performance of But looking at line in question, I suspect this is not a problem with Jackson as much as problem with caller somehow ending up not getting a cached instance. Two scenarios would be:
Otherwise, code should not get into this part of Another question is as to why "canDeserialize()" is being called at all -- it is often unnecessary, and it'd be better to simply call |
Cross posted to the spring-boot project as that is the component that is creating the ObjectMapper and objects that call the ObjectMapper. Hopefully they can provide some insight into the questions you are asking. |
Thanks! Historically there have been a few cases where high contention has led to finding other root causes, so this is not totally unusual finding. So I hope it turns out to be something simple. I also think that later versions of Spring started using |
Looks like we resolved the issue in the other thread. It was because I was using a Map and that deserializer isn't cached so it kept calling into that method to check. Now I am curious why the Map deserializer doesn't get cached. |
Hmmh. Could be historical thing; assumption being that introspection needed for POJOs is expensive, but one for Sounds like I should check into caching aspects to ensure that these deserializers (and ones for |
Map
deserializers not getting cached)
Ok: I changed 2.4 branch so that 2.4.4 should be caching |
Running some load tests on a Spring Boot based service whereby I am trying to reach 2000 requests per second. The service was responding fine up to 1000 rps but now trying to push 2000 is causing issues. Reviewing the code path with AppDynamics the thread is getting stuck in the DeserializerCache._createAndCacheValueDeserializer() method.
I have multiple stack traces that show the same method having over 200ms execution time on that method. Reviewing some of the old (2012) mailing lists posts shows that there was some issues around this but nothing concrete to fix / get around the issue. This is using the latest 2.4.3 version of jackson-databind.
Anyone able to provide recommendations on how to resolve this issue?
The text was updated successfully, but these errors were encountered: