[infinispan-issues] [JBoss JIRA] (ISPN-11341) Client requests go to wrong server with binary storage
Pedro Ruivo (Jira)
issues at jboss.org
Mon Mar 2 09:25:26 EST 2020
[ https://issues.redhat.com/browse/ISPN-11341?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pedro Ruivo updated ISPN-11341:
-------------------------------
Status: Resolved (was: Pull Request Sent)
Resolution: Done
> Client requests go to wrong server with binary storage
> ------------------------------------------------------
>
> Key: ISPN-11341
> URL: https://issues.redhat.com/browse/ISPN-11341
> 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: Dan Berindei
> Assignee: Gustavo Fernandes
> Priority: Major
> Fix For: 10.1.4.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