Details
-
Bug
-
Resolution: Fixed
-
Critical
-
None
-
Security Level: Public
-
None
Description
from Junyi:
Looks like the the parser of metadata is broken in mc_bin_client.py
def __parseMeta(self, data):
meta_type = struct.unpack('B', data[-1][0])[0]
length = struct.unpack('B', data[-1][1])[0]
meta = data[-1][2:2 + length]
return (meta_type, meta)
+ Chiyoung/Junyi,
seems like getRev or getMeta returns 0x00 instead of 0x01. any ideas ?
in the example below we did
mc.set()
mc.getMeta() - returns 0x00
then mc.delete()
mc.getMeta() - still return 0x00
-Farshid
On Jun 25, 2012, at 2:01 PM, Suhail Khaki wrote:
Hi Farshid,
While trying with mc_bin_client.getRev to replace the all_docs usage for the failed test case of XDCR, I am getting following error
Traceback (most recent call last):
File "pytests/xdcr.py", line 409, in test_continuous_unidirectional_deletes_1
rev_a = XDCRBaseTest.get_rev_info(rest_conn_a, self._buckets[0], kvstore.keys())
File "pytests/xdcr.py", line 147, in get_rev_info
ri = mc.getRev(k)
File "lib/mc_bin_client.py", line 228, in getRev
raise ValueError("Invalid meta type %x" % meta_type)
ValueError: Invalid meta type 0
Following code snippet is simulating my usage from shell.
>>> from mc_bin_client import MemcachedClient
>>> mc = MemcachedClient("10.3.121.123",11210)
>>> mc.vbucket_count = 64
>>> mc.set("x",0,0,"y")
(3304960032, 1139736286135715, '')
>>> mc.get("x")
(0, 1139736286135715, 'y')
>>> mc.getMeta("x")
(0, '')
>>> mc.getRev("x")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "mc_bin_client.py", line 206, in getRev
raise ValueError("Invalid meta type %x" % meta_type)
ValueError: Invalid meta type 0