python-memcached
python-memcached copied to clipboard
Flush on next connect flushes the entire Memcache server
It looks like setting flush on next connect executes a flush_all on the Memcache server on every reconnect. https://github.com/linsomniac/python-memcached/blob/master/memcache.py#L1413
This seems like a bug? Was the meaning of self.flush() misunderstood? I think we just want to flush the state from the connection and not expire all keys from the Memcache node.
Hello,
I think we face a similar issue on Openstack since we updated our code to pass the flush_on_reconnect param. [1][2][3] It will trigger a flush_all [4][5].
If you have several clients doing flush_on_reconnect, connections to memcached is going rapidly UP.
Because of this , memcached is extremly overkilled and process of flush is repeated again again, and connections are going UP and UP.
Please, can you tell us if this behavior is something expected or if this is a side effect that wasn't expected.
[1] https://bugs.launchpad.net/oslo.cache/+bug/1888394 [2] https://bugs.launchpad.net/keystonemiddleware/+bug/1883659 [3] https://bugs.launchpad.net/keystonemiddleware/+bug/1892852 [4] https://github.com/linsomniac/python-memcached/blob/master/memcache.py#L1388,L1389 [5] https://github.com/linsomniac/python-memcached/blob/master/memcache.py#L1413
I am fairly certain this is not expected and also don't expect it to be fixed given that this project is not being maintained. See #177 and #95
@sidprak thanks for the heads up, I think you're right.