Skip to content
This repository has been archived by the owner on Sep 18, 2021. It is now read-only.

Kestrel ignores memcache flags #4

Closed
elephantum opened this issue Sep 21, 2009 · 2 comments
Closed

Kestrel ignores memcache flags #4

elephantum opened this issue Sep 21, 2009 · 2 comments

Comments

@elephantum
Copy link

Module python-memcached uses memcache ability to add meta-data (flags) to store type of data, and uses it for parsing.

For example it sets flags=0x1 to say that data is pickled and should be unpickled.

Kestrel silently drops flags so meta-data is lost which leads us to unexpected behavior: we write python tuple "(1000, 100)", we get "(I1000
I100
tp1
." as a result.

As far as I understand Kestrel code, to achieve this functionality we should:

  1. add .flags member to QItem
  2. move instantiation of QItem from PersistentQueue.add to KestrelHandler.set
  3. use item.flags in formatting response in KestrelHandler.get

If these are acceptable changes I'm going to code them and present patch for review shortly.

@robey
Copy link
Contributor

robey commented Sep 21, 2009

that sounds fine to me. you will also need to add a new variant of ADD in the journal -- maybe ADD_FLAGS. and just always write ADD_FLAGS but still be able to read ADD and ADDX.

@robey
Copy link
Contributor

robey commented Mar 12, 2010

send me the patch and i'll merge it. :)

This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants