-
Bug
-
Resolution: Done
-
Major
-
5.1.4.FINAL, 5.1.5.CR1
-
None
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)