Jdesk / memcached

Automatically exported from code.google.com/p/memcached
0 stars 0 forks source link

CLIENT_ERROR not sent when fetching valid key with data + invalid key #152

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
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.

Original issue reported on code.google.com by ptero...@gmail.com on 29 Aug 2010 at 10:27

GoogleCodeExporter commented 9 years ago
I pushed a patch for this to 
http://github.com/trondn/memcached/commit/31c7156735c15ffa1c47268fb2513b4ee6240f
01

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..

Original comment by trond.no...@gmail.com on 30 Aug 2010 at 8:23

GoogleCodeExporter commented 9 years ago

Original comment by trond.no...@gmail.com on 14 Sep 2010 at 7:14