Uploaded image for project: 'Red Hat Data Grid'
  1. Red Hat Data Grid
  2. JDG-3527

Client requests go to wrong server with binary storage

XMLWordPrintable

      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.

            gfernand@redhat.com Gustavo Fernandes (Inactive)
            rhn-support-wfink Wolf Fink
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: