Description
This was originally observed with an older version, and in trying to reproduce it the latest change seems to show incr/decr is further broken. Still, this should be an easy test to add since it's been verified to fail.
from pymembase.membaseclient import VBucketAwareMembaseClient
client_one = VBucketAwareMembaseClient('http://host/pools/default','default','')
client_two = VBucketAwareMembaseClient('http://host/pools/default','default','')
- Client one sets a numeric key
client_one.set('jacob',0,0,'20')
client_one.get('jacob')
- Client two tries to increment this numeric key
client_two.incr('jacob') - This returns (0, cas) - it should be 21!
- Client two can keep incrementing this weird key
client_two.incr('jacob') - Returns (1, cas)
- However - if client two gets the key...
client_two.get('jacob')
client_two.incr('jacob') - (21, cas)
- !!!
p.s.: want to thank oliland from IRC on reporting this