libmemcached resets continuum with dead server
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
libmemcached |
Fix Released
|
Wishlist
|
Brian Aker | ||
libmemcached (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Testing with pylibmc
import pylibmc
hosts = ["10.234.
Using libmemcached 0.53
import pylibmc
hosts = ["IP_of_
mc = pylibmc.
mc.behaviors[
mc.behaviors[
mc.behaviors[
last_exception = None
while True:
try:
mc.
print mc.get("key")
except Exception as e:
print e
3 servers running, works fine
takedown the server handing the load
libmemcached returns
error 47 from memcached_set: SERVER HAS FAILED AND IS DISABLED UNTIL TIMED RETRY
until the number of retries has been reached, at which point the server is removed from the pool and the continuum is recalculated.
A different server starts handling the key, until... the retry timeout expires again, at which point the continuum is recalculated with the dead server back in, and now all calls fail with
error 35 from memcached_set: SERVER IS MARKED DEAD
What should happen is that after the timeouts there should be a single return of
error 35 from memcached_set: SERVER IS MARKED DEAD
After which the continuum is recalculated and values go to the new server.
Fix is to mark the server as dead, and exclude dead servers whenever recalculating the continuum (only works for consistent distributions - but that's what I'm using)
Changed in libmemcached (Ubuntu): | |
status: | Confirmed → Fix Released |
note - you'll need to use pylibmc 1.2.1 to reproduce this