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

Removing non-existent keys with force return previous value fails with Hot Rod client

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 5.1.5.FINAL
    • 5.1.4.FINAL, 5.1.5.CR1
    • Remote Protocols
    • None

    Description

      While investigating http://goo.gl/4t4gQ, I've come across an issue in the Hot Rod client. The protocol (https://docs.jboss.org/author/x/eICQ) indicates that the remove response consists of:

      If ForceReturnPreviousValue has been passed, remove response will contain previous value (including value length) for that key. If the key does not exist or previous was null, value length would be 0. Otherwise, if no ForceReturnPreviousValue was sent, the response would be empty.

      The problem is that the client does not read the last length byte if the key is not present, after a remove for a key with force return previous value that does not exists, if you do any operation, you'll see:

      org.infinispan.client.hotrod.exceptions.InvalidResponseException:: Invalid magic number. Expected 0xa1 and received 0x0
      	at org.infinispan.client.hotrod.impl.protocol.Codec10.readHeader(Codec10.java:92)

      Attachments

        Activity

          People

            rh-ee-galder Galder ZamarreƱo
            rh-ee-galder Galder ZamarreƱo
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: