Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-11341

Client requests go to wrong server with binary storage

    XMLWordPrintable

Details

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              gfernand@redhat.com Gustavo Fernandes (Inactive)
              dberinde@redhat.com Dan Berindei (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: