DESCRIPTION

CBQE-248: fix ERR_NOT_MY_VBUCKET error in VBucketAwareMemcached

Change-Id: I380a0470d35fbd33d4934f670f49604f78cd5363


COMMENTS

author: Esperanza Cherry
date: 2012-06-19 02:37:02.992000000

Uploaded patch set 3.

-------------------------------------
author: Hugo Blankenship
date: 2012-06-19 03:24:08.958000000

Patch Set 3:

Build Started http://qa.hq.northscale.net/job/testrunner-Jasmin Rangel-master/1026/ 

-------------------------------------
author: Hugo Blankenship
date: 2012-06-19 03:33:00.164000000

Patch Set 3: Verified

Build Successful 

http://qa.hq.northscale.net/job/testrunner-Jasmin Rangel-master/1026/ : SUCCESS

-------------------------------------
author: Zackery Barr
date: 2012-06-19 05:50:05.481000000

Patch Set 3: Do not submit

(3 inline comments)



Line:42, lib/mc_bin_client.py -> the vbucket count on each memcached changes very often so i dont think this should be part of the init code

Line:743, lib/memcached/helper/data_helper.py -> its not well formatted
it should be used_nodes = set(..

Line:744, lib/memcached/helper/data_helper.py -> why do we need to use deepcopy ?

-------------------------------------
author: Esperanza Cherry
date: 2012-06-19 06:12:37.521000000

Patch Set 3: Verified

(3 inline comments)



Line:42, lib/mc_bin_client.py -> currently it's a hardcode, and if we use vBuckets number other than 1024,  func  def _set_vbucket works incorrectly, that is used everywhere here.
I've added needed parameters in initialization of mcc in def direct_client from data_helper. so we can work with any number of vBuckets

Line:743, lib/memcached/helper/data_helper.py -> Do you mean to divide on 2 parts: get list and then get set?

Line:744, lib/memcached/helper/data_helper.py -> if not use deepcopy we get after first del operation : RuntimeError: dictionary changed size during iteration

-------------------------------------
author: Zackery Barr
date: 2012-06-19 06:21:27.560000000

Patch Set 3: (3 inline comments)



Line:48, lib/mc_bin_client.py -> yes but we are already resetting this to the right value
lib/memcached/helper/data_helper.py:        client.vbucket_count = len(vBuckets)
lib/memcached/helper/data_helper.py:                client.vbucket_count = len(vBuckets)

any case this part of the change looks fine to me.

Line:743, lib/memcached/helper/data_helper.py -> no you just need space chracters here and there.

Line:744, lib/memcached/helper/data_helper.py -> yes but im not sure then running delete will delete the object from the self.memcacheds then because memcache_con is an object in the deep-copied array.

instead of deeep copy you can create an array of those things you want to close and delete and then delete them in another loop

for memcached_conn in self.memcached:
if ..
to_be_deleted.append(xxx)

then for x in to_be_deleted:
  del self.memcached[x]

-------------------------------------
