python-memcached misses working backend

Bug #1380670 reported by Alexander Makarov on 2014-10-13
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Python Memcached

Bug Description

In multi-backend case there is always a chance for client to miss a working backend among not responding.

Assuming memcached is up and running on localhost:11211:

import memcache
import random
cl = memcache.Client(['localhost:11211', 'localhost:11212', 'localhost:11213', 'localhost:11214'])
while cl.set(str(random.random()), 1): pass

'while' must be an infinite loop since cl.set() returns True on success but it exits in milliseconds instead.

Bug may be fixed by changing backend selection logic, patch attached.

The other way is to use as linsomniac suggested:

Alexander Makarov (amakarov) wrote :
description: updated
description: updated
Dolph Mathews (dolph) on 2014-10-13
affects: keystone → python-memcached
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers