Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flush on next connect flushes the entire Memcache server #179

Open
sidprak opened this issue Dec 2, 2020 · 3 comments
Open

Flush on next connect flushes the entire Memcache server #179

sidprak opened this issue Dec 2, 2020 · 3 comments

Comments

@sidprak
Copy link

sidprak commented Dec 2, 2020

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.

@4383
Copy link

4383 commented Jan 14, 2021

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

@sidprak
Copy link
Author

sidprak commented Jan 14, 2021

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

@4383
Copy link

4383 commented Jan 15, 2021

@sidprak thanks for the heads up, I think you're right.

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

No branches or pull requests

2 participants