[infinispan-issues] [JBoss JIRA] (ISPN-11348) Client requests go to wrong server with binary storage
Wolf-Dieter Fink (Jira)
issues at jboss.org
Mon Feb 17 06:02:00 EST 2020
Wolf-Dieter Fink created ISPN-11348:
---------------------------------------
Summary: Client requests go to wrong server with binary storage
Key: ISPN-11348
URL: https://issues.redhat.com/browse/ISPN-11348
Project: Infinispan
Issue Type: Bug
Components: Core, Hot Rod, Server
Affects Versions: 9.4.18.Final, 10.1.2.Final, 11.0.0.Alpha1
Reporter: Wolf-Dieter Fink
Assignee: Gustavo Fernandes
Fix For: 10.1.3.Final, 11.0.0.Alpha2, 9.4.19.Final
Caches with BINARY storage accept {{byte[]}} keys, but add a prefix to indicate that the input was a {{byte[]}} and not a {{WrappedByteArray}}.
This happens in {{BinaryEncoder.toStorage()}}, before the segment of the key is computed, so the segment computed by the server is different from the segment computed by the client (based on the key without the prefix).
Since the client doesn't know (and shouldn't know) the server cache's storage type, the server should always compute the segment of the key based on the {{byte[]}} sent by the client. The simplest way to achieve that would be to make {{BinaryEncoder}} skip the marshalling for {{byte[]}}.
The only problem is that we don't want users to put in a {{WrappedByteArray}} and get back a {{byte[]}}, so we should disallow {{WrappedByteArray}} keys and values in {{Cache}} methods.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
More information about the infinispan-issues
mailing list