add and replace commands always expect response STORED

Bug #684689 reported by Michal Linhard
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Python Memcached
Won't Fix
Medium
Michal Linhard

Bug Description

memcached add command can also result to answer NOT_STORED
when the key exists in the cache
and replace command may result to answer NOT_STORED when the key is not present.

see following scenarios:
$ echo -e "set a 0 0 1\r\n1\r" | nc test1 11211
STORED
$ echo -e "add a 0 0 1\r\n1\r" | nc test1 11211
NOT_STORED
$ echo -e "replace b 0 0 1\r\n1\r" | nc test1 11211
NOT_STORED

these cases are not considered by python-memcached library version 1.45

Revision history for this message
Sean Reifschneider (jafo) wrote :

I believe the Python code returns True when STORED is returned and False when NOT_STORED is returned. This seems valid to me in these cases, are you proposing something else should be done?

Changed in python-memcached:
status: New → Won't Fix
importance: Undecided → Medium
assignee: nobody → Michal Linhard (michal-linhard)
Revision history for this message
Michal Linhard (michal-linhard) wrote :

well there are actually three outcomes of the add/replace operations:
STORED
NOT_STORED
ERROR
and the last two are not distinguished
but the solution proposed in https://bugs.launchpad.net/python-memcached/+bug/684690 would probably work for me here too

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.