Jdesk / memcached

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

binary protocol can only parse 1 command within a recieved udp / tcp buffer #107

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. compile attached code
2. start an empty memcached server with verbose (-vvv) with udp port 10000
3. run program against it. You will see that it processes both packages.
4. restart memcached and add the keys hello and world with random values.
5. rerun the program, it will only process the first packet and return.

What is the expected output? What do you see instead?
I expected to handle all commands in the packet.

What version of the product are you using? On what operating system?
memcached v1.4.3 on gentoo linux with kernel 2.6 and epoll.

Please provide any additional information below.

After some code reviewing I got it working through the attached patch. It's
just a quick hack to test my clientside driver, I think a better solution
can be made here.

On top of that I think it should be way better to pack the responses as
well. It uses 1 packet for each response even if there is room to fit in an
other get response.

Original issue reported on code.google.com by marlon%h...@gtempaccount.com on 12 Nov 2009 at 4:31

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by eric.d.l...@gmail.com on 11 Nov 2010 at 7:33

GoogleCodeExporter commented 9 years ago
wow this is ancient.

fix for this is currently sitting in my for_148 branch and will be in 1.4.8.

hope it's fixed, as I wasn't able to really reproduce the problem with the test 
script. The code certainly looked wrong though.

Original comment by dorma...@rydia.net on 28 Sep 2011 at 8:07