Welcome! Log In Create A New Profile

Advanced

Issue 152 in memcached: CLIENT_ERROR not sent when fetching valid key with data + invalid key

Posted by Anonymous User 
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 152 by pteromys: CLIENT_ERROR not sent when fetching valid key
with data + invalid key
http://code.google.com/p/memcached/issues/detail?id=152

What steps will reproduce the problem?
1. set x 0 0 1
2. get x [some 251-character key]

What is the expected output? What do you see instead?
I expect to see CLIENT_ERROR or END, or some other indication that the
response from the server is over. (I believe CLIENT_ERROR would be most
correct.) Instead I get a response for the first item and nothing else:
VALUE x 0 1
1

What version of the product are you using? On what operating system?
1.4.5 on Arch Linux

Please provide any additional information below.
The first key passed to "get" should be a valid key under which there is
data stored, and the second key just needs to be invalid (that is, longer
than 250 characters). I can confirm that CLIENT_ERROR does get sent as
expected if there is no data under the first key, or if the 251-character
key is requested on its own.
Updates:
Status: Started
Owner: trond.norbye

Comment #1 on issue 152 by trond.norbye: CLIENT_ERROR not sent when
fetching valid key with data + invalid key
http://code.google.com/p/memcached/issues/detail?id=152

I pushed a patch for this to
http://github.com/trondn/memcached/commit/31c7156735c15ffa1c47268fb2513b4ee6240f01

The problem is that we're trying to add a text part to the output with
out_string, but this doesn't work due to the logic in conn_write. The
easiest fix for this bug is to nuke all of the output we generated and send
the error message instead. Trying to "append" the error message could make
the resulting text unparsable for the client if we had a partial message
built up..
Updates:
Status: Fixed

Comment #2 on issue 152 by trond.norbye: CLIENT_ERROR not sent when
fetching valid key with data + invalid key
http://code.google.com/p/memcached/issues/detail?id=152

(No comment was entered for this change.)
Sorry, only registered users may post in this forum.

Click here to login