[infinispan-issues] [JBoss JIRA] (ISPN-6009) Stop using thread-locals for marshalling

Dan Berindei (JIRA) issues at jboss.org
Thu Dec 3 07:58:00 EST 2015


Dan Berindei created ISPN-6009:
----------------------------------

             Summary: Stop using thread-locals for marshalling
                 Key: ISPN-6009
                 URL: https://issues.jboss.org/browse/ISPN-6009
             Project: Infinispan
          Issue Type: Task
          Components: Core, Marshalling
    Affects Versions: 8.0.2.Final
            Reporter: Dan Berindei
            Assignee: Dan Berindei


Marshalling currently uses a thread-local cache for {{RiverMarshaller}} instances. One of the reasons to cache these {{RiverMarshaller}}s was that they always allocate 2 {{IdentityIntMap}}s, one for the instance cache and one for the class cache. 

But that also creates a problem, because these caches never shrink. If a {{StateResponseCommand}} includes a lot of {{Serializable}} objects, the caches will grow, and then they will never be used untile the next state transfer.

We should change our internal marshalling API so that it's easy to reuse marshallers without using thread-locals, and to use one-off marshallers for state transfer.

Currently unmarshalling also requires a thread-local to use the proper classloader. A session-based marshalling API would remove the need for the thread-local (especially important with sequential interceptors).



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)


More information about the infinispan-issues mailing list