Merge in changes to allow for weights on hosts.
authorBrian Aker <brian@tangent.org>
Mon, 4 Apr 2011 20:19:33 +0000 (13:19 -0700)
committerBrian Aker <brian@tangent.org>
Mon, 4 Apr 2011 20:19:33 +0000 (13:19 -0700)
1  2 
.bzrignore
ChangeLog
libmemcached/hosts.c
libmemcached/options/parser.am
libmemcached/server.h

diff --cc .bzrignore
index 06c56d6932753800ba5105272c51b4748ce41d0c,06c56d6932753800ba5105272c51b4748ce41d0c..6d1eabf5ea876b99d34ca43fe7096c728e97c2aa
@@@ -172,6 -172,6 +172,7 @@@ memflush.po
  memrm.pop
  memslap.pop
  memstat.pop
++out
  patch
  patch2
  stamp-h1
@@@ -181,6 -181,6 +182,7 @@@ support/libmemcached-fc.spe
  support/libmemcached.pc
  support/libmemcached.spec
  tests/atomsmasher
++tests/hash_plus
  tests/hashplus
  tests/memplus
  tests/output.cmp
diff --cc ChangeLog
index 9c0bea9ccff6f3769ce1fad28d73f381faa11560,b2ca1f743bb58f53157ae650cfeb78570dd2a7b8..828dae77631ba1917d05647bbacebfe54f451217
+++ b/ChangeLog
@@@ -2,6 -2,9 +2,8 @@@
    * Fix calls to auto methods so that if value is not passed in nothing bad happens.
    * New parser calls for generating memcached_st objects.
    * New error system.
 -
+   * A behavior change has been now made that if you specify a weight for any
+   server, we enable the weight flag and do weight balancing.
  
  0.48 Tue Mar 15 23:05:18 PDT 2011
    * Fix memory leak in server parse.
index d1fe29b8b22ebacf3804272fad1ce063db2ace8f,eafbb1b534ca083e76cb76fc75698403047549fe..65a4cd416bc34b9be06919f1259084c3ae5b4aae
@@@ -233,9 -225,9 +225,9 @@@ static memcached_return_t update_contin
          {
            for (uint32_t x= 0; x < pointer_per_hash; x++)
            {
-              value= ketama_server_hash(sort_host, (size_t)sort_host_length, x);
-              ptr->ketama.continuum[continuum_index].index= host_index;
-              ptr->ketama.continuum[continuum_index++].value= value;
+             uint32_t value= ketama_server_hash(sort_host, (size_t)sort_host_length, x);
 -             ptr->ketama.continuum[continuum_index].index= host_index;
 -             ptr->ketama.continuum[continuum_index++].value= value;
++            ptr->ketama.continuum[continuum_index].index= host_index;
++            ptr->ketama.continuum[continuum_index++].value= value;
            }
          }
          else
          {
            for (uint32_t x = 0; x < pointer_per_hash; x++)
            {
-              value= ketama_server_hash(sort_host, (size_t)sort_host_length, x);
 -             uint32_t value= ketama_server_hash(sort_host, (size_t)sort_host_length, x);
--             ptr->ketama.continuum[continuum_index].index= host_index;
--             ptr->ketama.continuum[continuum_index++].value= value;
++            uint32_t value= ketama_server_hash(sort_host, (size_t)sort_host_length, x);
++            ptr->ketama.continuum[continuum_index].index= host_index;
++            ptr->ketama.continuum[continuum_index++].value= value;
            }
          }
          else
index 0000000000000000000000000000000000000000,7bfd21c7518430ea8be29c8d8d9caf9ef9b5a0db..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
mode 000000,100644..100644
--- /dev/null
Simple merge