roc230 / spymemcached

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

Key hashes to wrong server intermittently #150

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hello, I am running version 2.5 on a Mac. I understand that I probably don't 
have all the information needed but I just want to get some feedback and let me 
know what further information I can provide.

Scenario: 2 servers, 1 client doing async gets for 500+ keys and somewhere in 
the middle a few keys will hash to the wrong server. I am running Wireshark and 
see that a key is directed to the wrong server. I can manually query the 
correct server and see that the key is there.

Here is the timeline:

Time 0: start the async gets

+150 msecs: the TCP connections are established to the servers (SYN etc.). I 
see this from the Wireshark and I assume that the async gets are buffered to 
this point. Around this time I see about 5 keys hashed to the wrong server

+200 msecs (from start): last of the async gets complete

+800 msecs: replies start to arrive from the server

My theory and I may be totally out to lunch on this is that while the SYN etc 
is done with the server there is a window where a server is perceived to be out 
of service.

Please me know what else I can try or other information I can provide. I have 
been running with logging enabled which generates copious amounts of output.

Eric

Original issue reported on code.google.com by yangcoo...@gmail.com on 3 Sep 2010 at 9:18

GoogleCodeExporter commented 9 years ago
I saw similar issue but not related to server start.

I did a test with 2 memcached servers, each with 512 mb ram.
Then I stored 5000 small sequential keys (0-string, 1-string ...etc) using 
binary connection factory. I passed the list of servers to addutil.
Then from another test program I fetched the list. For some reason when I 
stored and retrieved the values sequentially using binnaryconnection factory, i 
would get cache misses after ~3500. However when I used ketamaconnection 
factory the lookup succeeded everytime.
Does mean that hashing of binary connection factory is broken ?

Original comment by mukesh.a...@gmail.com on 19 Oct 2010 at 7:58

GoogleCodeExporter commented 9 years ago
@Eric is there any chance you can post the constructor?  That's certainly an 
interesting theory.  I might like to try to write a test for this.

@mukesh.a...  which version was this with?

Original comment by ingen...@gmail.com on 18 Feb 2011 at 7:05