Skip to content

Fixed server enumeration logic#57

Closed
x-eye wants to merge 2 commits intolinsomniac:masterfrom
x-eye:master
Closed

Fixed server enumeration logic#57
x-eye wants to merge 2 commits intolinsomniac:masterfrom
x-eye:master

Conversation

@x-eye
Copy link
Copy Markdown

@x-eye x-eye commented Sep 25, 2014

Created with a list of memcache servers client has non-zero chance
to fail any operation involving server selection due to _get_server()
sometimes fails to find single alive server among dead ones.

Changed server search routine to perform each new server search
excluding dead server.

More detailed description here:
https://bugs.launchpad.net/mos/+bug/1370324

Alexander Makarov added 2 commits September 25, 2014 18:18
Created with a list of memcache servers client has non-zero chance
to fail any operation involving server selection due to _get_server()
 sometimes fails to find single alive server among dead ones.

 Changed server search routine to perform each new server search
  excluding dead server.
Created with a list of memcache servers client has non-zero chance
to fail any operation involving server selection due to _get_server()
sometimes fails to find single alive server among dead ones.

Changed server search routine to perform each new server search
excluding dead server.

Updated to run under Python 3

 Bug filed in Mirantis OpenStack:
 https://bugs.launchpad.net/mos/+bug/1370324
@linsomniac
Copy link
Copy Markdown
Owner

I'm reluctant to change this algorithm, particularly in this way. As a maintenance change, we can't just go changing the server selection algorithm, "buggy" or not...

The only way I am likely to be able to take a change to the server selection algorithm is to make it "plugable", so that an alternate algorithm can be selected at run-time, with the default staying as it is.

Additionally, the correct fix for server selection algorithm is likely to be Consistent Hashing: http://en.wikipedia.org/wiki/Consistent_hashing

An implementation of Consistent Hashing is at: https://github.com/linsomniac/python-memcached2/blob/master/memcached2.py -- search for ConsistentHashing

@linsomniac linsomniac closed this Sep 27, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants