memcached_clone() and distribution hash bug

Bug #1009493 reported by ping,cai
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libmemcached
Fix Released
Medium
Brian Aker

Bug Description

when we new a memcached_st, and set hehavior of MEMCACHED_BEHAVIOR_KETAMA,

////code//////////////
memc = memcached_create(NULL);

memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_KETAMA, 1);

clone = memcached_clone(NULL, memc);

printf("%llu\n", memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_KETAMA_WEIGHTED));
printf("%llu\n", memcached_behavior_get(clone, MEMCACHED_BEHAVIOR_KETAMA_WEIGHTED));

//////////code//////////////

the value of MEMCACHED_BEHAVIOR_KETAMA_WEIGHTED is different, which will cause the miss match of key mapping.

the course of the problem is, in the function memcached_clone(), the ketama value in "memc" is not copied to "clone"

Brian Aker (brianaker)
Changed in libmemcached:
milestone: none → 1.0.10
assignee: nobody → Brian Aker (brianaker)
importance: Undecided → Medium
status: New → Fix Committed
Brian Aker (brianaker)
Changed in libmemcached:
status: Fix Committed → Fix Released
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.