Bug 993738 - Unmarshall problem in compatibility mode
Summary: Unmarshall problem in compatibility mode
Alias: None
Product: JBoss Data Grid 6
Classification: JBoss
Component: Infinispan
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
Target Milestone: ER2
: 6.2.0
Assignee: Tristan Tarrant
QA Contact: Nobody
Depends On:
Blocks: 1010419
TreeView+ depends on / blocked
Reported: 2013-08-06 11:58 UTC by Michal Linhard
Modified: 2014-04-28 15:39 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed:
Type: Bug

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker ISPN-3398 0 Critical Resolved Unmarshall problem in compatibility mode 2016-03-10 11:00:52 UTC

Description Michal Linhard 2013-08-06 11:58:54 UTC
see https://issues.jboss.org/browse/ISPN-3398

Comment 2 JBoss JIRA Server 2013-09-12 10:55:53 UTC
Martin Gencur <mgencur> made a comment on jira ISPN-3398

Are you sure you're using the same version of HotRod client and HotRod server? The server is trying to unmarshall the data sent by HotRod client. This issue appears only if HotRod server is trying to retrieve an object from byte array that was not created as a result of marshalling or the versions of marshallers were different.

Comment 3 JBoss JIRA Server 2013-09-12 11:15:10 UTC
Martin Gencur <mgencur> made a comment on jira ISPN-3398

Ah, I overlooked that the version in the error message changes. This signifies that the byte array that is being unmarshalled is not a product of marshalling (e.g. byte array created in some other way or already unmarshalled)

Comment 4 JBoss JIRA Server 2013-09-13 07:16:18 UTC
Martin Gencur <mgencur> made a comment on jira ISPN-3398

I found the root cause. It is similar to ISPN-3406 where boxValue/boxKey/unboxValue is called twice. First on the node where the Put command originated and then on the other node where the data is replicated. Since the data was already unmarshalled on the originating node, another attempt to unmarshall the data from the byte array fails with the exception above. 

This is only replicable in dist/repl mode and with byte array values. The HotRodTypeConverter handles byte arrays in a special way and hence this problem appears.

However, this problem is more general. Not only put command is affected but IMO also replace and remove commands. And not only with bytearray values but also with bytearray keys. Also, I think that if we specified a marshaller for EmbeddedTypeConverter, it would not be possible to store byte array values either, and that also in single-node deployment. That's because the converter is automatically trying to unmarshall the byte array (but of course it depends how the marshaller is implemented).

Here you can find tests to reproduce the issues for all the operations: 

Comment 5 Michal Linhard 2013-09-16 15:15:23 UTC
Still present in 6.2.0.DR4

Comment 7 Michal Linhard 2013-10-09 16:41:27 UTC
Verified for 6.2.0.ER2

Note You need to log in before you can comment on or make changes to this bug.