renatoh commented on PR #4370:
URL: https://github.com/apache/solr/pull/4370#issuecomment-4412280803

   > I looked at the unit tests, and yes, if you revert the change, the unit 
test fails..... I am a bit surprised that this bug hasn't been seen before? Can 
you share a bit on how you stumbled across this? Is this something that can 
actually happen in a running Solr, or does it only happen in the way you set it 
up.
   > 
   > Also, I have seen recently in another project that apparently 
ObjectMapper's are expensive to create and threadsafe so they SHOULD be reused?
   
   Yes, they are thread-safe and should be reused, that is also stated on the 
java-doc:
   
https://fasterxml.github.io/jackson-databind/javadoc/2.6/com/fasterxml/jackson/databind/ObjectMapper.html
   
   And indeed, the ObjectMapper has not been reused before, I have added a test 
to ensure it is reused now, and this test is failing with the 
MessageBodyReaders prior my change.
   Are we potentially creating an own ObjectMapper instance for eveyr API-call?
   
   I came across working on this ticket:
   https://issues.apache.org/jira/browse/SOLR-18191
   I realized change org.apache.solr.jersey.SolrJacksonMapper had no effect on 
how the API-calls where de-serialized, Investigating why, I discovered the 
SolrJacksonMapper is not used at all for an API-call such as creating a new 
collection.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to