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

Change in FLAGS set by 1.59 breaks compatibility with earlier python-memcached clients #140

Open
microwavenby opened this issue Jan 25, 2018 · 2 comments

Comments

@microwavenby
Copy link

microwavenby commented Jan 25, 2018

Hi there,

I had a server environment (with a shared AWS ElastiCache Memcached node between servers) where some clients were using python-memcached 1.58 and others had upgraded to 1.59 (not pinned versions, unfortunately)

When the 1.58 client attempted to read a key set by 1.59, I get the following exception

mc.get('tz:14059607')
MemCached: unknown flags on get: 10

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/plotwatt/app-deploy/pip/memcache.py", line 1129, in get
    return self._get('get', key)
  File "/usr/local/plotwatt/app-deploy/pip/memcache.py", line 1113, in _get
    return _unsafe_get()
  File "/usr/local/plotwatt/app-deploy/pip/memcache.py", line 1101, in _unsafe_get
    value = self._recv_value(server, flags, rlen)
  File "/usr/local/plotwatt/app-deploy/pip/memcache.py", line 1293, in _recv_value
    raise ValueError('Unknown flags on get: %x' % flags)
ValueError: Unknown flags on get: 10

When upgrading this client to 1.59, the issue no longer occurs:

mc.get('tz:14059607')
u'America/Los_Angeles'
@dropwhile
Copy link
Contributor

Presumably the incompatibility was introduced by #135

@marcan
Copy link

marcan commented Dec 1, 2019

The reverse problem also happens: keys set by 1.58 as strings are now returned as bytes on 1.59, breaking code that expects them to be strings.

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

3 participants