[infinispan-issues] [JBoss JIRA] (ISPN-5477) Compatibility with L1 can lead to wrong return type

Galder Zamarreño (JIRA) issues at jboss.org
Mon May 18 12:05:19 EDT 2015


Galder Zamarreño created ISPN-5477:
--------------------------------------

             Summary: Compatibility with L1 can lead to wrong return type
                 Key: ISPN-5477
                 URL: https://issues.jboss.org/browse/ISPN-5477
             Project: Infinispan
          Issue Type: Bug
          Components: Remote Protocols
    Affects Versions: 7.2.1.Final
            Reporter: Galder Zamarreño
            Assignee: Galder Zamarreño
             Fix For: 7.2.2.Final


Currently, when using compatibility mode with distributed caches, it is possible for users to store keys using embedded API which hash differently to when the same key is access via remote API. This is due to the differences in source data. For embedded, the source object is the POJO, whereas for remote, the source object is the byte[] format of the pojo.

When using such keys, remote APIs might go to a node which is not owner, leading to a remote get. When two gets are executed, the first of which results in L1 entry being added to the container, the second get result in exceptions such as this on the client:

{code}
java.lang.ClassCastException: [B cannot be cast to xxx....
{code}

This is due to over eager unboxing by the BaseTypeConverterInterceptor. I discovered this while investigating ISPN-5449.

It would be ideal to not have scenarios where there are diverging keys but for that, clients would need to know when compatibility is enabled, which currently is not known by the clients. Maybe this could be negotiated with the ping command?



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)



More information about the infinispan-issues mailing list