Skip to content

Commit 3615441

Browse files
Mike WiederholdMichael Wiederhold
authored andcommitted
Getl no longer removes the key from binary message.
Due to MB-3689 in Membase server we were required to provide a hack in spymemcached that striped the key out of the body field of a binary response message Change-Id: Ida71e6557f45c73287f12ba44040553024b7a4a1 Reviewed-on: http://review.couchbase.org/6949 Reviewed-by: Michael Wiederhold <[email protected]> Tested-by: Michael Wiederhold <[email protected]>
1 parent 090da95 commit 3615441

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/main/java/net/spy/memcached/protocol/binary/GetOperationImpl.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,8 @@ protected void decodePayload(byte[] pl) {
8080
GetsOperation.Callback gcb=(GetsOperation.Callback)cb;
8181
gcb.gotData(key, flags, responseCas, data);
8282
} else if (cb instanceof GetlOperation.Callback) {
83-
//getl return the key and value. So we need to strip off the key
84-
byte[] value = new byte[data.length-key.length()];
85-
System.arraycopy(data, key.length(), value, 0, data.length-key.length());
8683
GetlOperation.Callback gcb=(GetlOperation.Callback)cb;
87-
gcb.gotData(key, flags, responseCas, value);
84+
gcb.gotData(key, flags, responseCas, data);
8885
} else if (cb instanceof GetAndTouchOperation.Callback) {
8986
GetAndTouchOperation.Callback gcb=(GetAndTouchOperation.Callback)cb;
9087
gcb.gotData(key, flags, responseCas, data);

0 commit comments

Comments
 (0)