Merge lp:~mordred/libmemcached/pandora-build into lp:~tangent-org/libmemcached/trunk

Proposed by Monty Taylor
Status: Merged
Merged at revision: not available
Proposed branch: lp:~mordred/libmemcached/pandora-build
Merge into: lp:~tangent-org/libmemcached/trunk
Diff against target: 3599 lines (+1124/-807)
73 files modified
.bzrignore (+107/-0)
AUTHORS (+1/-1)
ChangeLog (+11/-1)
Makefile.am (+4/-3)
clients/include.am (+1/-1)
configure.ac (+17/-3)
docs/Makefile.am (+514/-457)
docs/libmemcached.pod (+1/-1)
docs/libmemcached_examples.pod (+1/-1)
docs/libmemcachedutil.pod (+2/-2)
docs/make_index.pl (+30/-0)
docs/memcached_analyze.pod (+1/-1)
docs/memcached_auto.pod (+1/-1)
docs/memcached_behavior.pod (+1/-1)
docs/memcached_callback.pod (+1/-1)
docs/memcached_create.pod (+7/-2)
docs/memcached_delete.pod (+1/-1)
docs/memcached_dump.pod (+1/-1)
docs/memcached_flush.pod (+1/-1)
docs/memcached_flush_buffers.pod (+2/-2)
docs/memcached_generate_hash_value.pod (+1/-1)
docs/memcached_get.pod (+1/-1)
docs/memcached_memory_allocators.pod (+2/-2)
docs/memcached_pool.pod (+2/-2)
docs/memcached_quit.pod (+1/-1)
docs/memcached_result_st.pod (+1/-1)
docs/memcached_server_st.pod (+1/-1)
docs/memcached_servers.pod (+16/-3)
docs/memcached_set.pod (+1/-1)
docs/memcached_stats.pod (+1/-1)
docs/memcached_strerror.pod (+1/-1)
docs/memcached_user_data.pod (+2/-2)
docs/memcached_verbosity.pod (+1/-1)
docs/memcached_version.pod (+1/-1)
docs/memcapable.pod (+2/-2)
docs/memcat.pod (+1/-1)
docs/memcp.pod (+1/-1)
docs/memdump.pod (+1/-1)
docs/memerror.pod (+1/-1)
docs/memflush.pod (+1/-1)
docs/memrm.pod (+1/-1)
docs/memslap.pod (+51/-54)
docs/memstat.pod (+1/-1)
libhashkit/Makefile.am (+0/-45)
libhashkit/hsieh.c (+2/-2)
libhashkit/include.am (+47/-0)
libmemcached/analyze.c (+1/-1)
libmemcached/auto.c (+2/-2)
libmemcached/behavior.c (+1/-1)
libmemcached/configure.h.in (+9/-6)
libmemcached/delete.c (+2/-2)
libmemcached/dump.c (+2/-2)
libmemcached/flush.c (+5/-5)
libmemcached/flush_buffers.c (+6/-6)
libmemcached/get.c (+9/-10)
libmemcached/hash.c (+7/-7)
libmemcached/hosts.c (+23/-53)
libmemcached/include.am (+30/-31)
libmemcached/io.c (+11/-5)
libmemcached/memcached.c (+32/-0)
libmemcached/memcached.h (+8/-6)
libmemcached/memcached/protocol_binary.h (+1/-1)
libmemcached/quit.c (+3/-3)
libmemcached/server.c (+19/-8)
libmemcached/server.h (+11/-1)
libmemcached/stats.c (+2/-2)
libmemcached/storage.c (+2/-2)
libmemcached/verbosity.c (+1/-1)
libmemcached/version.c (+5/-3)
m4/pandora_canonical.m4 (+1/-1)
m4/pandora_have_libmemcached.m4 (+19/-0)
support/libmemcached.spec.in (+40/-7)
tests/function.c (+26/-31)
To merge this branch: bzr merge lp:~mordred/libmemcached/pandora-build
Reviewer Review Type Date Requested Status
Brian Aker Pending
Review via email: mp+17097@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Monty Taylor (mordred) wrote :

Updated pandora-build. Also, fixed a header include - because it sure is used in the server protocol headers.

698. By Brian Aker <brian@gaz>

Style cleanup.

699. By Brian Aker <brian@gaz>

Name correction for test system.

700. By Brian Aker <brian@gaz>

New stats output for collection information.

701. By Brian Aker <brian@gaz>

Absorb test bits into anonymous structure.

702. By Brian Aker <brian@gaz>

Fix structure of test.c where we call code before/after a collection runs.

703. By Brian Aker <brian@gaz>

Updated test framework.

704. By Brian Aker <brian@gaz>

Updated .spec file for release.

705. By Brian Aker <brian@gaz>

.pop now ignored.

706. By Brian Aker <brian@gaz>

Updates for version 0.37.

707. By Brian Aker <brian@gaz>

Spec fix.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file '.bzrignore'
--- .bzrignore 2009-12-19 00:22:26 +0000
+++ .bzrignore 2010-01-12 00:36:12 +0000
@@ -39,20 +39,127 @@
39config/plugin.ac39config/plugin.ac
40configure40configure
41docs/*.[13]41docs/*.[13]
42docs/*.html
43docs/pod2htmd.tmp
44docs/pod2htmi.tmp
42example/memcached_light45example/memcached_light
46hashkit_clone.pop
47hashkit_crc32.pop
48hashkit_create.pop
49hashkit_fnv1_32.pop
50hashkit_fnv1_64.pop
51hashkit_fnv1a_32.pop
52hashkit_fnv1a_64.pop
53hashkit_free.pop
54hashkit_functions.pop
55hashkit_hsieh.pop
56hashkit_is_allocated.pop
57hashkit_jenkins.pop
58hashkit_md5.pop
59hashkit_murmur.pop
60hashkit_value.pop
43libmemcached-*.tar.gz61libmemcached-*.tar.gz
44libmemcached-0.30-1.src.rpm62libmemcached-0.30-1.src.rpm
45libmemcached-0.30-1.x86_64.rpm63libmemcached-0.30-1.x86_64.rpm
46libmemcached-0.31-1.src.rpm64libmemcached-0.31-1.src.rpm
47libmemcached-0.31-1.x86_64.rpm65libmemcached-0.31-1.x86_64.rpm
48libmemcached-?.??/66libmemcached-?.??/
67libmemcached.pop
68libmemcached/configure.h
49libmemcached/memcached_configure.h69libmemcached/memcached_configure.h
70libmemcached_examples.pop
71libmemcachedutil.pop
50libtool72libtool
51libtool.m473libtool.m4
52ltoptions.m474ltoptions.m4
53ltsugar.m475ltsugar.m4
54ltversion.m476ltversion.m4
55lt~obsolete.m477lt~obsolete.m4
78memcached_add.pop
79memcached_add_by_key.pop
80memcached_analyze.pop
81memcached_append.pop
82memcached_append_by_key.pop
83memcached_behavior_get.pop
84memcached_behavior_set.pop
85memcached_callback_get.pop
86memcached_callback_set.pop
87memcached_cas.pop
88memcached_cas_by_key.pop
89memcached_clone.pop
90memcached_create.pop
91memcached_decrement.pop
92memcached_decrement_with_initial.pop
93memcached_delete.pop
94memcached_delete_by_key.pop
95memcached_dump.pop
96memcached_fetch.pop
97memcached_fetch_execute.pop
98memcached_fetch_result.pop
99memcached_flush.pop
100memcached_flush_buffers.pop
101memcached_free.pop
102memcached_generate_hash_value.pop
103memcached_get.pop
104memcached_get_by_key.pop
105memcached_get_memory_allocators.pop
106memcached_get_user_data.pop
107memcached_increment.pop
108memcached_increment_with_initial.pop
109memcached_lib_version.pop
110memcached_mget.pop
111memcached_mget_by_key.pop
112memcached_mget_execute.pop
113memcached_mget_execute_by_key.pop
114memcached_pool_behavior_get.pop
115memcached_pool_behavior_set.pop
116memcached_pool_create.pop
117memcached_pool_destroy.pop
118memcached_pool_pop.pop
119memcached_pool_push.pop
120memcached_prepend.pop
121memcached_prepend_by_key.pop
122memcached_quit.pop
123memcached_replace.pop
124memcached_replace_by_key.pop
125memcached_result_cas.pop
126memcached_result_create.pop
127memcached_result_flags.pop
128memcached_result_free.pop
129memcached_result_key_length.pop
130memcached_result_key_value.pop
131memcached_result_length.pop
132memcached_result_st.pop
133memcached_result_value.pop
134memcached_server_add.pop
135memcached_server_add_unix_socket.pop
136memcached_server_count.pop
137memcached_server_list.pop
138memcached_server_list_append.pop
139memcached_server_list_count.pop
140memcached_server_list_free.pop
141memcached_server_push.pop
142memcached_servers_parse.pop
143memcached_set.pop
144memcached_set_by_key.pop
145memcached_set_memory_allocators.pop
146memcached_set_user_data.pop
147memcached_stat.pop
148memcached_stat_get_keys.pop
149memcached_stat_get_value.pop
150memcached_stat_servername.pop
151memcached_strerror.pop
152memcached_verbosity.pop
153memcached_version.pop
154memcapable.pop
155memcat.pop
156memcp.pop
157memdump.pop
158memerror.pop
159memflush.pop
160memrm.pop
161memslap.pop
162memstat.pop
56stamp-h1163stamp-h1
57support/Makefile164support/Makefile
58support/Makefile.in165support/Makefile.in
59166
=== modified file 'AUTHORS'
--- AUTHORS 2009-12-16 19:03:49 +0000
+++ AUTHORS 2010-01-12 00:36:12 +0000
@@ -3,7 +3,7 @@
3Patrick Galbraith, -- C++ Interface3Patrick Galbraith, -- C++ Interface
4Padraig O'Sullivan, -- C++ Interface (current one)4Padraig O'Sullivan, -- C++ Interface (current one)
5Tim Bunce, -- Docs5Tim Bunce, -- Docs
6Trond Norbye, trond.norbye@sun.com -- Binary protocol, Misc6Trond Norbye, trond.norbye@gmail.com -- Binary protocol, Misc
7Yin Chen, -- Ketama Work7Yin Chen, -- Ketama Work
8Toru Maesaka, dev@torum.net -- Stats analysis8Toru Maesaka, dev@torum.net -- Stats analysis
9Eric Lambert, -- UDP work9Eric Lambert, -- UDP work
1010
=== modified file 'ChangeLog'
--- ChangeLog 2010-01-06 17:22:43 +0000
+++ ChangeLog 2010-01-12 00:36:12 +0000
@@ -1,4 +1,14 @@
10.3610.37
2 * Fixed build for libhashkit.
3 * Fixed install path regression.
4 * Modified RPM to strict check install.
5 * Added documentation for memcached_server_cursor();
6
7 * Added memcached_servers_reset().
8
9 * Modified memcached_st to remove dead cursor_server member.
10
110.36 Wed Jan 6 18:23:50 PST 2010
2 * Merged in new memslap utility.12 * Merged in new memslap utility.
3 * All of constants.h has been updated to match style (all old identifiers13 * All of constants.h has been updated to match style (all old identifiers
4 continue to work).14 continue to work).
515
=== modified file 'Makefile.am'
--- Makefile.am 2009-12-20 21:29:01 +0000
+++ Makefile.am 2010-01-12 00:36:12 +0000
@@ -10,18 +10,19 @@
10lib_LTLIBRARIES =10lib_LTLIBRARIES =
11noinst_LTLIBRARIES =11noinst_LTLIBRARIES =
12noinst_PROGRAMS =12noinst_PROGRAMS =
13pkginclude_HEADERS =13include_HEADERS =
14nobase_pkginclude_HEADERS =14nobase_include_HEADERS =
15EXTRA_HEADERS =15EXTRA_HEADERS =
16BUILT_SOURCES=16BUILT_SOURCES=
17EXTRA_DIST = README.FIRST17EXTRA_DIST = README.FIRST
1818
19SUBDIRS = docs libhashkit19SUBDIRS = docs
2020
21test-docs:21test-docs:
22 (cd docs && $(MAKE) test-docs)22 (cd docs && $(MAKE) test-docs)
23include libmemcached/include.am23include libmemcached/include.am
24include clients/include.am24include clients/include.am
25include libhashkit/include.am
25include tests/include.am26include tests/include.am
26include example/include.am27include example/include.am
27include support/include.am28include support/include.am
2829
=== modified file 'clients/include.am'
--- clients/include.am 2009-12-17 21:24:01 +0000
+++ clients/include.am 2010-01-12 00:36:12 +0000
@@ -69,7 +69,7 @@
69 clients/ms_stats.c \69 clients/ms_stats.c \
70 clients/ms_task.c \70 clients/ms_task.c \
71 clients/ms_thread.c71 clients/ms_thread.c
72clients_memslap_LDADD= $(LTLIBEVENT) clients/libgenexec.la $(CLIENTS_LDADDS)72clients_memslap_LDADD= $(LTLIBEVENT) clients/libgenexec.la $(CLIENTS_LDADDS) $(LIBM)
7373
74clients_memcapable_SOURCES= clients/memcapable.c74clients_memcapable_SOURCES= clients/memcapable.c
75if BUILD_BYTEORDER75if BUILD_BYTEORDER
7676
=== modified file 'configure.ac'
--- configure.ac 2009-12-20 11:18:07 +0000
+++ configure.ac 2010-01-12 00:36:12 +0000
@@ -6,7 +6,7 @@
6# the COPYING file in this directory for full text.6# the COPYING file in this directory for full text.
77
8AC_PREREQ(2.59)8AC_PREREQ(2.59)
9AC_INIT([libmemcached],[0.35],[http://tangent.org/552/libmemcached.html])9AC_INIT([libmemcached],[0.37],[http://tangent.org/552/libmemcached.html])
10AC_CONFIG_SRCDIR([libmemcached/memcached.c])10AC_CONFIG_SRCDIR([libmemcached/memcached.c])
11AC_CONFIG_AUX_DIR(config)11AC_CONFIG_AUX_DIR(config)
12AM_CONFIG_HEADER([config.h])12AM_CONFIG_HEADER([config.h])
@@ -14,6 +14,21 @@
1414
15PANDORA_CANONICAL_TARGET15PANDORA_CANONICAL_TARGET
1616
17#shared library versioning
18MEMCACHED_LIBRARY_VERSION=3:0:0
19# | | |
20# +------+ | +---+
21# | | |
22# current:revision:age
23# | | |
24# | | +- increment if interfaces have been added
25# | | set to zero if interfaces have been removed or changed
26# | +- increment if source code has changed
27# | set to zero if current is incremented
28# +- increment if interfaces have been added, removed or changed
29AC_SUBST(MEMCACHED_LIBRARY_VERSION)
30
31
17HASHKIT_LIBRARY_VERSION=0:0:032HASHKIT_LIBRARY_VERSION=0:0:0
18AC_SUBST(HASHKIT_LIBRARY_VERSION)33AC_SUBST(HASHKIT_LIBRARY_VERSION)
1934
@@ -51,8 +66,7 @@
51AC_CONFIG_FILES([66AC_CONFIG_FILES([
52 Makefile67 Makefile
53 docs/Makefile68 docs/Makefile
54 libmemcached/memcached_configure.h69 libmemcached/configure.h
55 libhashkit/Makefile
56 support/libmemcached.pc70 support/libmemcached.pc
57 support/libmemcached.spec71 support/libmemcached.spec
58 support/libmemcached-fc.spec72 support/libmemcached-fc.spec
5973
=== modified file 'docs/Makefile.am'
--- docs/Makefile.am 2009-12-20 11:18:07 +0000
+++ docs/Makefile.am 2010-01-12 00:36:12 +0000
@@ -1,116 +1,419 @@
1CLEANFILES= *.1 *.31# This file generates all of man/html pages that we use for documentation.
22#
33# When hacking this file you need to know that we take .pod files and turn
4EXTRA_DIST = \4# them into .pop files. .pop files are 1=1 for man pages, but one .pod
5 hashkit_create.pod \5# file may generate many .pop files.
6 hashkit_functions.pod \6#
7 hashkit_value.pod \7# -Brian
8 libmemcached.pod \8#
9 libmemcached_examples.pod \9#
10 libmemcachedutil.pod \10CLEANFILES= *.1 *.3 *.html *.pop *.tmp
11 memcached_analyze.pod \11
12 memcached_auto.pod \12BUILT_SOURCES=
13 memcached_behavior.pod \13
14 memcached_callback.pod \14EXTRA_DIST= make_index.pl
15 memcached_create.pod \15
16 memcached_delete.pod \16AUTO_PAGES= \
17 memcached_dump.pod \17 memcached_increment.pop \
18 memcached_flush.pod \18 memcached_increment_with_initial.pop \
19 memcached_flush_buffers.pod \19 memcached_decrement.pop \
20 memcached_generate_hash_value.pod \20 memcached_decrement_with_initial.pop
21 memcached_get.pod \21BUILT_SOURCES += ${AUTO_PAGES}
22 memcached_memory_allocators.pod \22
23 memcached_pool.pod \23BEHAVIOR_PAGES= \
24 memcached_quit.pod \24 memcached_behavior_get.pop \
25 memcached_server_st.pod \25 memcached_behavior_set.pop
26 memcached_servers.pod \26BUILT_SOURCES += ${BEHAVIOR_PAGES}
27 memcached_set.pod \27
28 memcached_stats.pod \28CALLBACK_PAGES= \
29 memcached_strerror.pod \29 memcached_callback_get.pop \
30 memcached_user_data.pod \30 memcached_callback_set.pop
31 memcached_verbosity.pod \31BUILT_SOURCES += ${CALLBACK_PAGES}
32 memcached_version.pod \32
33 memcapable.pod \33CREATE_PAGES= \
34 memcat.pod \34 memcached_clone.pop \
35 memcp.pod \35 memcached_create.pop \
36 memdump.pod \36 memcached_free.pop \
37 memerror.pod \37 memcached_servers_reset.pop
38 memflush.pod \38BUILT_SOURCES += ${CREATE_PAGES}
39 memrm.pod \39
40 memslap.pod \40DELETE_PAGES= \
41 memstat.pod41 memcached_delete.pop \
42 memcached_delete_by_key.pop
43BUILT_SOURCES += ${DELETE_PAGES}
44
45GENERIC_PAGES= \
46 libmemcached.pop \
47 libmemcached_examples.pop \
48 libmemcachedutil.pop \
49 memcached_analyze.pop \
50 memcached_dump.pop \
51 memcached_flush.pop \
52 memcached_flush_buffers.pop \
53 memcached_generate_hash_value.pop \
54 memcached_quit.pop \
55 memcached_strerror.pop \
56 memcached_verbosity.pop \
57 memcapable.pop \
58 memcat.pop \
59 memcp.pop \
60 memdump.pop \
61 memerror.pop \
62 memflush.pop \
63 memrm.pop \
64 memslap.pop \
65 memstat.pop
66BUILT_SOURCES += ${GENERIC_PAGES}
67
68GET_PAGES= \
69 memcached_get.pop \
70 memcached_get_by_key.pop \
71 memcached_fetch_result.pop \
72 memcached_fetch_execute.pop \
73 memcached_mget.pop \
74 memcached_mget_by_key.pop \
75 memcached_mget_execute.pop \
76 memcached_mget_execute_by_key.pop \
77 memcached_fetch.pop
78BUILT_SOURCES += ${GET_PAGES}
79
80MEMORY_ALLOCATORS_PAGES= \
81 memcached_get_memory_allocators.pop \
82 memcached_set_memory_allocators.pop
83BUILT_SOURCES += ${MEMORY_ALLOCATORS_PAGES}
84
85POOL_PAGES= \
86 memcached_pool_behavior_get.pop \
87 memcached_pool_behavior_set.pop \
88 memcached_pool_create.pop \
89 memcached_pool_destroy.pop \
90 memcached_pool_pop.pop \
91 memcached_pool_push.pop
92BUILT_SOURCES += ${POOL_PAGES}
93
94RESULT_PAGES= \
95 memcached_result_cas.pop \
96 memcached_result_create.pop \
97 memcached_result_flags.pop \
98 memcached_result_free.pop \
99 memcached_result_key_length.pop \
100 memcached_result_key_value.pop \
101 memcached_result_length.pop \
102 memcached_result_st.pop \
103 memcached_result_value.pop
104BUILT_SOURCES += ${RESULT_PAGES}
105
106
107SERVER_PAGES= \
108 memcached_server_count.pop \
109 memcached_server_cursor.pop \
110 memcached_server_list.pop \
111 memcached_server_add.pop \
112 memcached_server_add_unix_socket.pop \
113 memcached_server_push.pop
114BUILT_SOURCES += ${SERVER_PAGES}
115
116SERVER_ST_PAGES= \
117 memcached_server_list_free.pop \
118 memcached_server_list_count.pop \
119 memcached_server_list_append.pop \
120 memcached_servers_parse.pop
121BUILT_SOURCES += ${SERVER_ST_PAGES}
122
123SET_PAGES= \
124 memcached_set.pop \
125 memcached_set_by_key.pop \
126 memcached_cas.pop \
127 memcached_cas_by_key.pop \
128 memcached_replace.pop \
129 memcached_replace_by_key.pop \
130 memcached_add.pop \
131 memcached_add_by_key.pop \
132 memcached_prepend.pop \
133 memcached_prepend_by_key.pop \
134 memcached_append.pop \
135 memcached_append_by_key.pop
136BUILT_SOURCES += ${SET_PAGES}
137
138STATS_PAGES= \
139 memcached_stat.pop \
140 memcached_stat_get_keys.pop .pop\
141 memcached_stat_get_value.pop \
142 memcached_stat_servername.pop
143BUILT_SOURCES += ${STATS_PAGES}
144
145USER_DATA_PAGES= \
146 memcached_get_user_data.pop \
147 memcached_set_user_data.pop
148BUILT_SOURCES += ${USER_DATA_PAGES}
149
150VERSION_PAGES= \
151 memcached_version.pop \
152 memcached_lib_version.pop
153BUILT_SOURCES += ${VERSION_PAGES}
154
155
156#
157# These are for libhashkit
158#
159HASHKIT_CREATE_PAGES= \
160 hashkit_is_allocated.pop \
161 hashkit_create.pop \
162 hashkit_clone.pop \
163 hashkit_free.pop
164BUILT_SOURCES += ${HASHKIT_CREATE_PAGES}
165
166HASHKIT_FUNCTIONS_PAGES= \
167 hashkit_crc32.pop \
168 hashkit_fnv1_32.pop \
169 hashkit_fnv1_64.pop \
170 hashkit_fnv1a_32.pop \
171 hashkit_fnv1a_64.pop \
172 hashkit_functions.pop \
173 hashkit_hsieh.pop \
174 hashkit_jenkins.pop \
175 hashkit_md5.pop \
176 hashkit_murmur.pop
177BUILT_SOURCES += ${HASHKIT_FUNCTIONS_PAGES}
178
179HASHKIT_ST_PAGES= \
180 hashkit_value.pop
181BUILT_SOURCES += ${HASHKIT_ST_PAGES}
182
183
184HTML_FILES= \
185 hashkit_clone.html \
186 hashkit_crc32.html \
187 hashkit_create.html \
188 hashkit_fnv1_32.html \
189 hashkit_fnv1_64.html \
190 hashkit_fnv1a_32.html \
191 hashkit_fnv1a_64.html \
192 hashkit_free.html \
193 hashkit_functions.html \
194 hashkit_hsieh.html \
195 hashkit_is_allocated.html \
196 hashkit_jenkins.html \
197 hashkit_md5.html \
198 hashkit_murmur.html \
199 hashkit_value.html \
200 libmemcached_examples.html \
201 libmemcached.html \
202 libmemcachedutil.html \
203 memcached_add_by_key.html \
204 memcached_add.html \
205 memcached_analyze.html \
206 memcached_append_by_key.html \
207 memcached_append.html \
208 memcached_behavior_get.html \
209 memcached_behavior_set.html \
210 memcached_callback_get.html \
211 memcached_callback_set.html \
212 memcached_cas_by_key.html \
213 memcached_cas.html \
214 memcached_clone.html \
215 memcached_create.html \
216 memcached_decrement.html \
217 memcached_decrement_with_initial.html \
218 memcached_delete_by_key.html \
219 memcached_delete.html \
220 memcached_dump.html \
221 memcached_fetch_execute.html \
222 memcached_fetch.html \
223 memcached_fetch_result.html \
224 memcached_flush_buffers.html \
225 memcached_flush.html \
226 memcached_free.html \
227 memcached_generate_hash_value.html \
228 memcached_get_by_key.html \
229 memcached_get_memory_allocators.html \
230 memcached_get.html \
231 memcached_get_user_data.html \
232 memcached_increment.html \
233 memcached_increment_with_initial.html \
234 memcached_lib_version.html \
235 memcached_mget_by_key.html \
236 memcached_mget_execute_by_key.html \
237 memcached_mget_execute.html \
238 memcached_mget.html \
239 memcached_pool_behavior_get.html \
240 memcached_pool_behavior_set.html \
241 memcached_pool_create.html \
242 memcached_pool_destroy.html \
243 memcached_pool_pop.html \
244 memcached_pool_push.html \
245 memcached_prepend_by_key.html \
246 memcached_prepend.html \
247 memcached_quit.html \
248 memcached_replace_by_key.html \
249 memcached_replace.html \
250 memcached_result_cas.html \
251 memcached_result_create.html \
252 memcached_result_flags.html \
253 memcached_result_free.html \
254 memcached_result_key_length.html \
255 memcached_result_key_value.html \
256 memcached_result_length.html \
257 memcached_result_st.html \
258 memcached_result_value.html \
259 memcached_server_add.html \
260 memcached_server_add_unix_socket.html \
261 memcached_server_count.html \
262 memcached_server_cursor.html \
263 memcached_server_list_append.html \
264 memcached_server_list_count.html \
265 memcached_server_list_free.html \
266 memcached_server_list.html \
267 memcached_server_push.html \
268 memcached_servers_parse.html \
269 memcached_set_by_key.html \
270 memcached_set_memory_allocators.html \
271 memcached_set.html \
272 memcached_set_user_data.html \
273 memcached_stat_get_keys.html \
274 memcached_stat_get_value.html \
275 memcached_stat.html \
276 memcached_stat_servername.html \
277 memcached_strerror.html \
278 memcached_verbosity.html \
279 memcached_version.html \
280 memcapable.html \
281 memcat.html \
282 memcp.html \
283 memdump.html \
284 memerror.html \
285 memflush.html \
286 memrm.html \
287 memslap.html \
288 memstat.html
289
290POD_FILES= \
291 hashkit_create.pod \
292 hashkit_functions.pod \
293 hashkit_value.pod \
294 libmemcached.pod \
295 libmemcached_examples.pod \
296 libmemcachedutil.pod \
297 memcached_analyze.pod \
298 memcached_auto.pod \
299 memcached_behavior.pod \
300 memcached_callback.pod \
301 memcached_create.pod \
302 memcached_delete.pod \
303 memcached_dump.pod \
304 memcached_flush.pod \
305 memcached_flush_buffers.pod \
306 memcached_generate_hash_value.pod \
307 memcached_get.pod \
308 memcached_memory_allocators.pod \
309 memcached_pool.pod \
310 memcached_quit.pod \
311 memcached_server_st.pod \
312 memcached_servers.pod \
313 memcached_set.pod \
314 memcached_stats.pod \
315 memcached_strerror.pod \
316 memcached_user_data.pod \
317 memcached_verbosity.pod \
318 memcached_version.pod \
319 memcapable.pod \
320 memcat.pod \
321 memcp.pod \
322 memdump.pod \
323 memerror.pod \
324 memflush.pod \
325 memrm.pod \
326 memslap.pod \
327 memstat.pod
328EXTRA_DIST+= $(POD_FILES)
42329
43man_MANS = \330man_MANS = \
44 libmemcached.3 \331 hashkit_clone.3 \
45 libmemcached_examples.3 \332 hashkit_crc32.3 \
46 memcached_add.3 \333 hashkit_create.3 \
47 memcached_add_by_key.3 \334 hashkit_fnv1_32.3 \
48 memcached_analyze.3 \335 hashkit_fnv1_64.3 \
49 memcached_append.3 \336 hashkit_fnv1a_32.3 \
50 memcached_append_by_key.3 \337 hashkit_fnv1a_64.3 \
51 memcached_behavior_get.3 \338 hashkit_free.3 \
52 memcached_behavior_set.3 \339 hashkit_functions.3 \
53 memcached_callback_get.3 \340 hashkit_hsieh.3 \
54 memcached_callback_set.3 \341 hashkit_is_allocated.3 \
55 memcached_cas.3 \342 hashkit_jenkins.3 \
56 memcached_cas_by_key.3 \343 hashkit_md5.3 \
57 memcached_clone.3 \344 hashkit_murmur.3 \
58 memcached_create.3 \345 hashkit_value.3 \
59 memcached_decrement.3 \346 libmemcached.3 \
60 memcached_decrement_with_initial.3 \347 libmemcached_examples.3 \
61 memcached_delete.3 \348 memcached_add.3 \
62 memcached_delete_by_key.3 \349 memcached_add_by_key.3 \
63 memcached_dump.3 \350 memcached_analyze.3 \
64 memcached_fetch.3 \351 memcached_append.3 \
65 memcached_fetch_execute.3 \352 memcached_append_by_key.3 \
66 memcached_fetch_result.3 \353 memcached_behavior_get.3 \
67 memcached_flush_buffers.3 \354 memcached_behavior_set.3 \
68 memcached_free.3 \355 memcached_callback_get.3 \
69 memcached_generate_hash_value.3 \356 memcached_callback_set.3 \
70 memcached_get.3 \357 memcached_cas.3 \
71 memcached_get_by_key.3 \358 memcached_cas_by_key.3 \
72 memcached_get_memory_allocators.3 \359 memcached_clone.3 \
73 memcached_get_user_data.3 \360 memcached_create.3 \
74 memcached_increment.3 \361 memcached_decrement.3 \
75 memcached_increment_with_initial.3 \362 memcached_decrement_with_initial.3 \
76 memcached_lib_version.3 \363 memcached_delete.3 \
77 memcached_mget.3 \364 memcached_delete_by_key.3 \
78 memcached_mget_by_key.3 \365 memcached_dump.3 \
79 memcached_mget_execute.3 \366 memcached_fetch.3 \
80 memcached_mget_execute_by_key.3 \367 memcached_fetch_execute.3 \
81 memcached_prepend.3 \368 memcached_fetch_result.3 \
82 memcached_prepend_by_key.3 \369 memcached_flush_buffers.3 \
83 memcached_quit.3 \370 memcached_free.3 \
84 memcached_replace.3 \371 memcached_generate_hash_value.3 \
85 memcached_replace_by_key.3 \372 memcached_get.3 \
86 memcached_server_add.3 \373 memcached_get_by_key.3 \
87 memcached_server_count.3 \374 memcached_get_memory_allocators.3 \
88 memcached_server_list.3 \375 memcached_get_user_data.3 \
89 memcached_server_list_append.3 \376 memcached_increment.3 \
90 memcached_server_list_count.3 \377 memcached_increment_with_initial.3 \
91 memcached_server_list_free.3 \378 memcached_lib_version.3 \
92 memcached_server_push.3 \379 memcached_mget.3 \
93 memcached_servers_parse.3 \380 memcached_mget_by_key.3 \
94 memcached_set.3 \381 memcached_mget_execute.3 \
95 memcached_set_by_key.3 \382 memcached_mget_execute_by_key.3 \
96 memcached_set_memory_allocators.3 \383 memcached_prepend.3 \
97 memcached_set_user_data.3 \384 memcached_prepend_by_key.3 \
98 memcached_stat.3 \385 memcached_quit.3 \
99 memcached_stat_get_keys.3 \386 memcached_replace.3 \
100 memcached_stat_get_value.3 \387 memcached_replace_by_key.3 \
101 memcached_stat_servername.3 \388 memcached_server_add.3 \
102 memcached_strerror.3 \389 memcached_server_count.3 \
103 memcached_verbosity.3 \390 memcached_server_cursor.3 \
104 memcached_version.3 \391 memcached_server_list.3 \
105 memcapable.1 \392 memcached_server_list_append.3 \
106 memcat.1 \393 memcached_server_list_count.3 \
107 memcp.1 \394 memcached_server_list_free.3 \
108 memdump.1 \395 memcached_server_push.3 \
109 memerror.1 \396 memcached_servers_parse.3 \
110 memflush.1 \397 memcached_set.3 \
111 memrm.1 \398 memcached_set_by_key.3 \
112 memslap.1 \399 memcached_set_memory_allocators.3 \
113 memstat.1400 memcached_set_user_data.3 \
401 memcached_stat.3 \
402 memcached_stat_get_keys.3 \
403 memcached_stat_get_value.3 \
404 memcached_stat_servername.3 \
405 memcached_strerror.3 \
406 memcached_verbosity.3 \
407 memcached_version.3 \
408 memcapable.1 \
409 memcat.1 \
410 memcp.1 \
411 memdump.1 \
412 memerror.1 \
413 memflush.1 \
414 memrm.1 \
415 memslap.1 \
416 memstat.1
114417
115if BUILD_LIBMEMCACHEDUTIL418if BUILD_LIBMEMCACHEDUTIL
116man_MANS+= \419man_MANS+= \
@@ -124,349 +427,103 @@
124endif427endif
125428
126429
127libmemcached.3: libmemcached.pod430${CREATE_PAGES}:
128 ${POD2MAN} -c "libmemcached" -r "" -s 3 ${top_srcdir}/docs/libmemcached.pod > libmemcached.3431 @rm -f $@
129432 ln -s ${top_srcdir}/docs/memcached_create.pod ${top_builddir}/docs/$@
130libmemcachedutil.3: libmemcachedutil.pod433
131 ${POD2MAN} -c "libmemcachedutil" -r "" -s 3 ${top_srcdir}/docs/libmemcachedutil.pod > libmemcachedutil.3434${SET_PAGES}:
132435 @rm -f $@
133libmemcached_examples.3: libmemcached_examples.pod436 ln -s ${top_srcdir}/docs/memcached_set.pod ${top_builddir}/docs/$@
134 ${POD2MAN} -c "libmemcached" -r "" -s 3 ${top_srcdir}/docs/libmemcached_examples.pod > libmemcached_examples.3437
135438${DELETE_PAGES}:
136memcached_create.3: memcached_create.pod439 @rm -f $@
137 ${POD2MAN} -c "libmemcached" -r "" -s 3 ${top_srcdir}/docs/memcached_create.pod > memcached_create.3440 ln -s ${top_srcdir}/docs/memcached_delete.pod ${top_builddir}/docs/$@
138441
139memcached_free.3: memcached_create.pod442${AUTO_PAGES}:
140 ${POD2MAN} -c "libmemcached" -r "" -s 3 ${top_srcdir}/docs/memcached_create.pod > memcached_free.3443 @rm -f $@
141444 ln -s ${top_srcdir}/docs/memcached_auto.pod ${top_builddir}/docs/$@
142memcached_clone.3: memcached_create.pod445
143 ${POD2MAN} -c "libmemcached" -r "" -s 3 ${top_srcdir}/docs/memcached_create.pod > memcached_clone.3446${GET_PAGES}:
144447 @rm -f $@
145memcached_set.3: memcached_set.pod448 ln -s ${top_srcdir}/docs/memcached_get.pod ${top_builddir}/docs/$@
146 ${POD2MAN} -c "libmemcached" -r "" -s 3 ${top_srcdir}/docs/memcached_set.pod > memcached_set.3449
147450${SERVER_PAGES}:
148memcached_set_by_key.3: memcached_set.pod451 @rm -f $@
149 ${POD2MAN} -c "libmemcached" -r "" -s 3 ${top_srcdir}/docs/memcached_set.pod > memcached_set_by_key.3452 ln -s ${top_srcdir}/docs/memcached_servers.pod ${top_builddir}/docs/$@
150453
151memcached_cas.3: memcached_set.pod454${SERVER_ST_PAGES}:
152 ${POD2MAN} -c "libmemcached" -r "" -s 3 ${top_srcdir}/docs/memcached_set.pod > memcached_cas.3455 @rm -f $@
153456 ln -s ${top_srcdir}/docs/memcached_server_st.pod ${top_builddir}/docs/$@
154memcached_cas_by_key.3: memcached_set.pod457
155 ${POD2MAN} -c "libmemcached" -r "" -s 3 ${top_srcdir}/docs/memcached_set.pod > memcached_cas_by_key.3458${GENERIC_PAGES}:
156459 @rm -f $@
157memcached_replace.3: memcached_set.pod460 ln -s ${top_srcdir}/docs/$*.pod ${top_builddir}/docs/$@
158 ${POD2MAN} -c "libmemcached" -r "" -s 3 ${top_srcdir}/docs/memcached_set.pod > memcached_replace.3461
159462${BEHAVIOR_PAGES}:
160memcached_replace_by_key.3: memcached_set.pod463 @rm -f $@
161 ${POD2MAN} -c "libmemcached" -r "" -s 3 ${top_srcdir}/docs/memcached_set.pod > memcached_replace_by_key.3464 ln -s ${top_srcdir}/docs/memcached_behavior.pod ${top_builddir}/docs/$@
162465
163memcached_add.3: memcached_set.pod466${CALLBACK_PAGES}:
164 ${POD2MAN} -c "libmemcached" -r "" -s 3 ${top_srcdir}/docs/memcached_set.pod > memcached_add.3467 @rm -f $@
165468 ln -s ${top_srcdir}/docs/memcached_callback.pod ${top_builddir}/docs/$@
166memcached_add_by_key.3: memcached_set.pod469
167 ${POD2MAN} -c "libmemcached" -r "" -s 3 ${top_srcdir}/docs/memcached_set.pod > memcached_add_by_key.3470${STATS_PAGES}:
168471 @rm -f $@
169memcached_prepend.3: memcached_set.pod472 ln -s ${top_srcdir}/docs/memcached_stats.pod ${top_builddir}/docs/$@
170 ${POD2MAN} -c "libmemcached" -r "" -s 3 ${top_srcdir}/docs/memcached_set.pod > memcached_prepend.3473
171474${RESULT_PAGES}:
172memcached_prepend_by_key.3: memcached_set.pod475 @rm -f $@
173 ${POD2MAN} -c "libmemcached" -r "" -s 3 ${top_srcdir}/docs/memcached_set.pod > memcached_prepend_by_key.3476 ln -s ${top_srcdir}/docs/memcached_result_st.pod ${top_builddir}/docs/$@
174477
175memcached_append.3: memcached_set.pod478${VERSION_PAGES}:
176 ${POD2MAN} -c "libmemcached" -r "" -s 3 ${top_srcdir}/docs/memcached_set.pod > memcached_append.3479 @rm -f $@
177480 ln -s ${top_srcdir}/docs/memcached_version.pod ${top_builddir}/docs/$@
178memcached_append_by_key.3: memcached_set.pod481
179 ${POD2MAN} -c "libmemcached" -r "" -s 3 ${top_srcdir}/docs/memcached_set.pod > memcached_append_by_key.3482${MEMORY_ALLOCATORS_PAGES}:
180483 @rm -f $@
181memcached_delete.3: memcached_delete.pod484 ln -s ${top_srcdir}/docs/memcached_memory_allocators.pod ${top_builddir}/docs/$@
182 ${POD2MAN} -c "libmemcached" -r "" -s 3 ${top_srcdir}/docs/memcached_delete.pod > memcached_delete.3485
183486${USER_DATA_PAGES}:
184memcached_delete_by_key.3: memcached_delete.pod487 @rm -f $@
185 ${POD2MAN} -c "libmemcached" -r "" -s 3 ${top_srcdir}/docs/memcached_delete.pod > memcached_delete_by_key.3488 ln -s ${top_srcdir}/docs/memcached_user_data.pod ${top_builddir}/docs/$@
186489
187memcached_increment.3:490
188 ${POD2MAN} -c "libmemcached" -r "" -s 3 ${top_srcdir}/docs/memcached_auto.pod > memcached_increment.3491${POOL_PAGES}:
189492 @rm -f $@
190memcached_increment_with_initial.3:493 ln -s ${top_srcdir}/docs/memcached_pool.pod ${top_builddir}/docs/$@
191 ${POD2MAN} -c "libmemcached" -r "" -s 3 ${top_srcdir}/docs/memcached_auto.pod > memcached_increment_with_initial.3494
192495${HASHKIT_CREATE_PAGES}:
193memcached_decrement.3:496 @rm -f $@
194 ${POD2MAN} -c "libmemcached" -r "" -s 3 ${top_srcdir}/docs/memcached_auto.pod > memcached_decrement.3497 ln -s ${top_srcdir}/docs/hashkit_create.pod ${top_builddir}/docs/$@
195498
196memcached_decrement_with_initial.3:499
197 ${POD2MAN} -c "libmemcached" -r "" -s 3 ${top_srcdir}/docs/memcached_auto.pod > memcached_decrement_with_initial.3500${HASHKIT_FUNCTIONS_PAGES}:
198501 @rm -f $@
199memcached_dump.3: memcached_dump.pod502 ln -s ${top_srcdir}/docs/hashkit_functions.pod ${top_builddir}/docs/$@
200 ${POD2MAN} -c "libmemcached" -r "" -s 3 ${top_srcdir}/docs/memcached_dump.pod > memcached_dump.3503
201504${HASHKIT_ST_PAGES}:
202memcached_flush.3: memcached_flush.pod505 @rm -f $@
203 ${POD2MAN} -c "libmemcached" -r "" -s 3 ${top_srcdir}/docs/memcached_flush.pod > memcached_flush.3506 ln -s ${top_srcdir}/docs/hashkit_value.pod ${top_builddir}/docs/$@
204507
205memcached_get.3: memcached_get.pod508test-docs: $(POD_FILES)
206 ${POD2MAN} -c "libmemcached" -r "" -s 3 ${top_srcdir}/docs/memcached_get.pod > memcached_get.3509 ${PODCHECKER} $(top_srcdir)/docs/$?
207510
208memcached_get_by_key.3: memcached_get.pod511html-local: html-pages html-index
209 ${POD2MAN} -c "libmemcached" -r "" -s 3 ${top_srcdir}/docs/memcached_get.pod > memcached_get_by_key.3512
210513html-pages: $(HTML_FILES)
211memcached_fetch_result.3: memcached_get.pod514
212 ${POD2MAN} -c "libmemcached" -r "" -s 3 ${top_srcdir}/docs/memcached_get.pod > memcached_fetch_result.3515html-index: html-pages
213516 perl make_index.pl *.html > index.html
214memcached_fetch_execute.3: memcached_get.pod517
215 ${POD2MAN} -c "libmemcached" -r "" -s 3 ${top_srcdir}/docs/memcached_get.pod > memcached_fetch_execute.3518SUFFIXES= .pop .pod .html .1 .3
216519
217memcached_mget.3: memcached_get.pod520.pop: ${_set}
218 ${POD2MAN} -c "libmemcached" -r "" -s 3 ${top_srcdir}/docs/memcached_get.pod > memcached_mget.3521
219522.pop.html:
220memcached_mget_by_key.3: memcached_get.pod523 pod2html --infile=$< > $@
221 ${POD2MAN} -c "libmemcached" -r "" -s 3 ${top_srcdir}/docs/memcached_get.pod > memcached_mget_by_key.3524
222525.pop.1:
223memcached_mget_execute.3: memcached_get.pod526 ${POD2MAN} -c "$*" -r "" -s 1 $< > $@
224 ${POD2MAN} -c "libmemcached" -r "" -s 3 ${top_srcdir}/docs/memcached_get.pod > memcached_mget_execute.3527
225528.pop.3:
226memcached_mget_execute_by_key.3: memcached_get.pod529 ${POD2MAN} -c "$*" -r "" -s 3 $< > $@
227 ${POD2MAN} -c "libmemcached" -r "" -s 3 ${top_srcdir}/docs/memcached_get.pod > memcached_mget_execute_by_key.3
228
229memcached_fetch.3: memcached_get.pod
230 ${POD2MAN} -c "libmemcached" -r "" -s 3 ${top_srcdir}/docs/memcached_get.pod > memcached_fetch.3
231
232memcached_quit.3: memcached_quit.pod
233 ${POD2MAN} -c "libmemcached" -r "" -s 3 ${top_srcdir}/docs/memcached_quit.pod > memcached_quit.3
234
235memcached_strerror.3: memcached_strerror.pod
236 ${POD2MAN} -c "libmemcached" -r "" -s 3 ${top_srcdir}/docs/memcached_strerror.pod > memcached_strerror.3
237
238memcached_server_count.3: memcached_servers.pod
239 ${POD2MAN} -c "libmemcached" -r "" -s 3 ${top_srcdir}/docs/memcached_servers.pod > memcached_server_count.3
240
241memcached_server_list.3: memcached_servers.pod
242 ${POD2MAN} -c "libmemcached" -r "" -s 3 ${top_srcdir}/docs/memcached_servers.pod > memcached_server_list.3
243
244memcached_server_add.3: memcached_servers.pod
245 ${POD2MAN} -c "libmemcached" -r "" -s 3 ${top_srcdir}/docs/memcached_servers.pod > memcached_server_add.3
246
247memcached_server_add_unix_socket.3: memcached_servers.pod
248 ${POD2MAN} -c "libmemcached" -r "" -s 3 ${top_srcdir}/docs/memcached_servers.pod > memcached_server_add_unix_socket.3
249
250memcached_server_push.3: memcached_servers.pod
251 ${POD2MAN} -c "libmemcached" -r "" -s 3 ${top_srcdir}/docs/memcached_servers.pod > memcached_server_push.3
252
253memcached_server_list_free.3: memcached_server_st.pod
254 ${POD2MAN} -c "libmemcached" -r "" -s 3 ${top_srcdir}/docs/memcached_server_st.pod > memcached_server_list_free.3
255
256memcached_server_list_count.3: memcached_server_st.pod
257 ${POD2MAN} -c "libmemcached" -r "" -s 3 ${top_srcdir}/docs/memcached_server_st.pod > memcached_server_list_count.3
258
259memcached_server_list_append.3: memcached_server_st.pod
260 ${POD2MAN} -c "libmemcached" -r "" -s 3 ${top_srcdir}/docs/memcached_server_st.pod > memcached_server_list_append.3
261
262memcached_servers_parse.3: memcached_server_st.pod
263 ${POD2MAN} -c "libmemcached" -r "" -s 3 ${top_srcdir}/docs/memcached_server_st.pod > memcached_servers_parse.3
264
265memcached_verbosity.3: memcached_verbosity.pod
266 ${POD2MAN} -c "libmemcached" -r "" -s 3 ${top_srcdir}/docs/memcached_verbosity.pod > memcached_verbosity.3
267
268memcached_behavior_get.3: memcached_behavior.pod
269 ${POD2MAN} -c "libmemcached" -r "" -s 3 ${top_srcdir}/docs/memcached_behavior.pod > memcached_behavior_get.3
270
271memcached_behavior_set.3: memcached_behavior.pod
272 ${POD2MAN} -c "libmemcached" -r "" -s 3 ${top_srcdir}/docs/memcached_behavior.pod > memcached_behavior_set.3
273
274memcached_callback_get.3: memcached_callback.pod
275 ${POD2MAN} -c "libmemcached" -r "" -s 3 ${top_srcdir}/docs/memcached_callback.pod > memcached_callback_get.3
276
277memcached_callback_set.3: memcached_callback.pod
278 ${POD2MAN} -c "libmemcached" -r "" -s 3 ${top_srcdir}/docs/memcached_callback.pod > memcached_callback_set.3
279
280memcached_stat.3: memcached_stats.pod
281 ${POD2MAN} -c "libmemcached" -r "" -s 3 ${top_srcdir}/docs/memcached_stats.pod > memcached_stat.3
282
283memcached_stat_servername.3: memcached_stats.pod
284 ${POD2MAN} -c "libmemcached" -r "" -s 3 ${top_srcdir}/docs/memcached_stats.pod > memcached_stat_servername.3
285
286memcached_stat_get_value.3: memcached_stats.pod
287 ${POD2MAN} -c "libmemcached" -r "" -s 3 ${top_srcdir}/docs/memcached_stats.pod > memcached_stat_get_value.3
288
289memcached_stat_get_keys.3: memcached_stats.pod
290 ${POD2MAN} -c "libmemcached" -r "" -s 3 ${top_srcdir}/docs/memcached_stats.pod > memcached_stat_get_keys.3
291
292memcached_result_st.3: memcached_result_st.pod
293 ${POD2MAN} -c "libmemcached" -r "" -s 3 ${top_srcdir}/docs/memcached_result_st.pod > memcached_result_st.3
294
295memcached_result_create.3: memcached_result_st.pod
296 ${POD2MAN} -c "libmemcached" -r "" -s 3 ${top_srcdir}/docs/memcached_result_st.pod > memcached_result_create.3
297
298memcached_result_free.3: memcached_result_st.pod
299 ${POD2MAN} -c "libmemcached" -r "" -s 3 ${top_srcdir}/docs/memcached_result_st.pod > memcached_result_free.3
300
301memcached_result_key_value.3: memcached_result_st.pod
302 ${POD2MAN} -c "libmemcached" -r "" -s 3 ${top_srcdir}/docs/memcached_result_st.pod > memcached_result_key_value.3
303
304memcached_result_key_length.3: memcached_result_st.pod
305 ${POD2MAN} -c "libmemcached" -r "" -s 3 ${top_srcdir}/docs/memcached_result_st.pod > memcached_result_key_length.3
306
307memcached_result_value.3: memcached_result_st.pod
308 ${POD2MAN} -c "libmemcached" -r "" -s 3 ${top_srcdir}/docs/memcached_result_st.pod > memcached_result_value.3
309
310memcached_result_length.3: memcached_result_st.pod
311 ${POD2MAN} -c "libmemcached" -r "" -s 3 ${top_srcdir}/docs/memcached_result_st.pod > memcached_result_length.3
312
313memcached_result_flags.3: memcached_result_st.pod
314 ${POD2MAN} -c "libmemcached" -r "" -s 3 ${top_srcdir}/docs/memcached_result_st.pod > memcached_result_flags.3
315
316memcached_result_cas.3: memcached_result_st.pod
317 ${POD2MAN} -c "libmemcached" -r "" -s 3 ${top_srcdir}/docs/memcached_result_st.pod > memcached_result_cas.3
318
319memcached_version.3: memcached_version.pod
320 ${POD2MAN} -c "libmemcached" -r "" -s 3 ${top_srcdir}/docs/memcached_version.pod > memcached_version.3
321
322memcached_lib_version.3: memcached_version.pod
323 ${POD2MAN} -c "libmemcached" -r "" -s 3 ${top_srcdir}/docs/memcached_version.pod > memcached_lib_version.3
324
325memcached_flush_buffers.3: memcached_flush_buffers.pod
326 ${POD2MAN} -c "libmemcached" -r "" -s 3 ${top_srcdir}/docs/memcached_flush_buffers.pod > memcached_flush_buffers.3
327
328memcached_analyze.3: memcached_analyze.pod
329 ${POD2MAN} -c "libmemcached" -r "" -s 3 ${top_srcdir}/docs/memcached_analyze.pod > memcached_analyze.3
330
331memcached_generate_hash_value.3: memcached_generate_hash_value.pod
332 ${POD2MAN} -c "libmemcached" -r "" -s 3 ${top_srcdir}/docs/memcached_generate_hash_value.pod > memcached_generate_hash_value.3
333
334memcached_get_memory_allocators.3: memcached_memory_allocators.pod
335 ${POD2MAN} -c "libmemcached" -r "" -s 3 ${top_srcdir}/docs/memcached_memory_allocators.pod > memcached_get_memory_allocators.3
336
337memcached_set_memory_allocators.3: memcached_memory_allocators.pod
338 ${POD2MAN} -c "libmemcached" -r "" -s 3 ${top_srcdir}/docs/memcached_memory_allocators.pod > memcached_set_memory_allocators.3
339
340memcached_get_user_data.3: memcached_user_data.pod
341 ${POD2MAN} -c "libmemcached" -r "" -s 3 ${top_srcdir}/docs/memcached_user_data.pod > memcached_get_user_data.3
342
343memcached_set_user_data.3: memcached_user_data.pod
344 ${POD2MAN} -c "libmemcached" -r "" -s 3 ${top_srcdir}/docs/memcached_user_data.pod > memcached_set_user_data.3
345
346memcached_pool_behavior_get.3: memcached_pool.pod
347 ${POD2MAN} -c "libmemcachedutil" -r "" -s 3 ${top_srcdir}/docs/memcached_pool.pod > memcached_pool_behavior_get.3
348
349memcached_pool_behavior_set.3: memcached_pool.pod
350 ${POD2MAN} -c "libmemcachedutil" -r "" -s 3 ${top_srcdir}/docs/memcached_pool.pod > memcached_pool_behavior_set.3
351
352memcached_pool_create.3: memcached_pool.pod
353 ${POD2MAN} -c "libmemcachedutil" -r "" -s 3 ${top_srcdir}/docs/memcached_pool.pod > memcached_pool_create.3
354
355memcached_pool_destroy.3: memcached_pool.pod
356 ${POD2MAN} -c "libmemcachedutil" -r "" -s 3 ${top_srcdir}/docs/memcached_pool.pod > memcached_pool_destroy.3
357
358memcached_pool_pop.3: memcached_pool.pod
359 ${POD2MAN} -c "libmemcachedutil" -r "" -s 3 ${top_srcdir}/docs/memcached_pool.pod > memcached_pool_pop.3
360
361memcached_pool_push.3: memcached_pool.pod
362 ${POD2MAN} -c "libmemcachedutil" -r "" -s 3 ${top_srcdir}/docs/memcached_pool.pod > memcached_pool_push.3
363
364memcp.1: memcp.pod
365 ${POD2MAN} -c "libmemcached" -r "" -s 1 ${top_srcdir}/docs/memcp.pod > memcp.1
366
367memslap.1: memslap.pod
368 ${POD2MAN} -c "libmemcached" -r "" -s 1 ${top_srcdir}/docs/memslap.pod > memslap.1
369
370memcapable.1: memcapable.pod
371 ${POD2MAN} -c "libmemcached" -r "" -s 1 ${top_srcdir}/docs/memcapable.pod > memcapable.1
372
373memcat.1: memcat.pod
374 ${POD2MAN} -c "libmemcached" -r "" -s 1 ${top_srcdir}/docs/memcat.pod > memcat.1
375
376memstat.1: memstat.pod
377 ${POD2MAN} -c "libmemcached" -r "" -s 1 ${top_srcdir}/docs/memstat.pod > memstat.1
378
379memrm.1: memrm.pod
380 ${POD2MAN} -c "libmemcached" -r "" -s 1 ${top_srcdir}/docs/memrm.pod > memrm.1
381
382memerror.1: memerror.pod
383 ${POD2MAN} -c "libmemcached" -r "" -s 1 ${top_srcdir}/docs/memerror.pod > memerror.1
384
385memdump.1: memdump.pod
386 ${POD2MAN} -c "libmemcached" -r "" -s 1 ${top_srcdir}/docs/memdump.pod > memdump.1
387
388memflush.1: memflush.pod
389 ${POD2MAN} -c "libmemcached" -r "" -s 1 ${top_srcdir}/docs/memflush.pod > memflush.1
390
391hashkit_create.3: hashkit_create.pod
392 ${POD2MAN} -c "libhashkit" -r "" -s 3 ${top_srcdir}/docs/hashkit_create.pod > hashkit_create.3
393
394hashkit_clone.3: hashkit_create.pod
395 ${POD2MAN} -c "libhashkit" -r "" -s 3 ${top_srcdir}/docs/hashkit_create.pod > hashkit_clone.3
396
397hashkit_free.3: hashkit_create.pod
398 ${POD2MAN} -c "libhashkit" -r "" -s 3 ${top_srcdir}/docs/hashkit_create.pod > hashkit_free.3
399
400hashkit_is_allocated.3: hashkit_create.pod
401 ${POD2MAN} -c "libhashkit" -r "" -s 3 ${top_srcdir}/docs/hashkit_create.pod > hashkit_is_allocated.3
402
403hashkit_functions.3: hashkit_functions.pod
404 ${POD2MAN} -c "libhashkit" -r "" -s 3 ${top_srcdir}/docs/hashkit_functions.pod > hashkit_functions.3
405
406hashkit_fnv1_64.3: hashkit_functions.pod
407 ${POD2MAN} -c "libhashkit" -r "" -s 3 ${top_srcdir}/docs/hashkit_functions.pod > hashkit_fnv1_64.3
408
409hashkit_fnv1a_64.3: hashkit_functions.pod
410 ${POD2MAN} -c "libhashkit" -r "" -s 3 ${top_srcdir}/docs/hashkit_functions.pod > hashkit_fnv1a_64.3
411
412hashkit_fnv1_32.3: hashkit_functions.pod
413 ${POD2MAN} -c "libhashkit" -r "" -s 3 ${top_srcdir}/docs/hashkit_functions.pod > hashkit_fnv1_32.3
414
415hashkit_fnv1a_32.3: hashkit_functions.pod
416 ${POD2MAN} -c "libhashkit" -r "" -s 3 ${top_srcdir}/docs/hashkit_functions.pod > hashkit_fnv1a_32.3
417
418hashkit_crc32.3: hashkit_functions.pod
419 ${POD2MAN} -c "libhashkit" -r "" -s 3 ${top_srcdir}/docs/hashkit_functions.pod > hashkit_crc32.3
420
421hashkit_hsieh.3: hashkit_functions.pod
422 ${POD2MAN} -c "libhashkit" -r "" -s 3 ${top_srcdir}/docs/hashkit_functions.pod > hashkit_hsieh.3
423
424hashkit_murmur.3: hashkit_functions.pod
425 ${POD2MAN} -c "libhashkit" -r "" -s 3 ${top_srcdir}/docs/hashkit_functions.pod > hashkit_murmur.3
426
427hashkit_jenkins.3: hashkit_functions.pod
428 ${POD2MAN} -c "libhashkit" -r "" -s 3 ${top_srcdir}/docs/hashkit_functions.pod > hashkit_jenkins.3
429
430hashkit_md5.3: hashkit_functions.pod
431 ${POD2MAN} -c "libhashkit" -r "" -s 3 ${top_srcdir}/docs/hashkit_functions.pod > hashkit_md5.3
432
433hashkit_value.3: hashkit_value.pod
434 ${POD2MAN} -c "libhashkit" -r "" -s 3 ${top_srcdir}/docs/hashkit_value.pod > hashkit_value.3
435
436test-docs:
437 ${PODCHECKER} $(top_srcdir)/docs/hashkit_create.pod
438 ${PODCHECKER} $(top_srcdir)/docs/hashkit_functions.pod
439 ${PODCHECKER} $(top_srcdir)/docs/hashkit_value.pod
440 ${PODCHECKER} $(top_srcdir)/docs/libmemcached.pod
441 ${PODCHECKER} $(top_srcdir)/docs/libmemcached_examples.pod
442 ${PODCHECKER} $(top_srcdir)/docs/memcached_auto.pod
443 ${PODCHECKER} $(top_srcdir)/docs/memcached_behavior.pod
444 ${PODCHECKER} $(top_srcdir)/docs/memcached_callback.pod
445 ${PODCHECKER} $(top_srcdir)/docs/memcached_create.pod
446 ${PODCHECKER} $(top_srcdir)/docs/memcached_delete.pod
447 ${PODCHECKER} $(top_srcdir)/docs/memcached_flush.pod
448 ${PODCHECKER} $(top_srcdir)/docs/memcached_flush_buffers.pod
449 ${PODCHECKER} $(top_srcdir)/docs/memcached_get.pod
450 ${PODCHECKER} $(top_srcdir)/docs/memcached_memory_allocators.pod
451 ${PODCHECKER} $(top_srcdir)/docs/memcached_pool.pod
452 ${PODCHECKER} $(top_srcdir)/docs/memcached_quit.pod
453 ${PODCHECKER} $(top_srcdir)/docs/memcached_server_st.pod
454 ${PODCHECKER} $(top_srcdir)/docs/memcached_servers.pod
455 ${PODCHECKER} $(top_srcdir)/docs/memcached_set.pod
456 ${PODCHECKER} $(top_srcdir)/docs/memcached_stats.pod
457 ${PODCHECKER} $(top_srcdir)/docs/memcached_strerror.pod
458 ${PODCHECKER} $(top_srcdir)/docs/memcached_user_data.pod
459 ${PODCHECKER} $(top_srcdir)/docs/memcached_verbosity.pod
460 ${PODCHECKER} $(top_srcdir)/docs/memcached_version.pod
461 ${PODCHECKER} $(top_srcdir)/docs/memcapable.pod
462 ${PODCHECKER} $(top_srcdir)/docs/memcat.pod
463 ${PODCHECKER} $(top_srcdir)/docs/memcp.pod
464 ${PODCHECKER} $(top_srcdir)/docs/memerror.pod
465 ${PODCHECKER} $(top_srcdir)/docs/memflush.pod
466 ${PODCHECKER} $(top_srcdir)/docs/memrm.pod
467 ${PODCHECKER} $(top_srcdir)/docs/memslap.pod
468 ${PODCHECKER} $(top_srcdir)/docs/memstat.pod
469
470html-local:
471 pod2htmltree "/libmemcached" .
472
473530
=== modified file 'docs/libmemcached.pod'
--- docs/libmemcached.pod 2009-12-16 18:53:44 +0000
+++ docs/libmemcached.pod 2010-01-12 00:36:12 +0000
@@ -113,7 +113,7 @@
113=head1 HOME113=head1 HOME
114114
115To find out more information please check:115To find out more information please check:
116L<http://tangent.org/552/libmemcached.html>116L<https://launchpad.net/libmemcached>
117117
118=head1 AUTHOR118=head1 AUTHOR
119119
120120
=== modified file 'docs/libmemcached_examples.pod'
--- docs/libmemcached_examples.pod 2009-12-16 18:53:44 +0000
+++ docs/libmemcached_examples.pod 2010-01-12 00:36:12 +0000
@@ -101,7 +101,7 @@
101=head1 HOME101=head1 HOME
102102
103To find out more information please check:103To find out more information please check:
104L<http://tangent.org/552/libmemcached.html>104L<https://launchpad.net/libmemcached>
105105
106=head1 AUTHOR106=head1 AUTHOR
107107
108108
=== modified file 'docs/libmemcachedutil.pod'
--- docs/libmemcachedutil.pod 2009-05-12 00:51:25 +0000
+++ docs/libmemcachedutil.pod 2010-01-12 00:36:12 +0000
@@ -27,11 +27,11 @@
27=head1 HOME27=head1 HOME
2828
29To find out more information please check:29To find out more information please check:
30L<http://tangent.org/552/libmemcached.html>30L<https://launchpad.net/libmemcached>
3131
32=head1 AUTHOR32=head1 AUTHOR
3333
34Trond Norbye, E<lt>trond.norbye@sun.comE<gt>34Trond Norbye, E<lt>trond.norbye@gmail.comE<gt>
3535
36=head1 SEE ALSO36=head1 SEE ALSO
3737
3838
=== added file 'docs/make_index.pl'
--- docs/make_index.pl 1970-01-01 00:00:00 +0000
+++ docs/make_index.pl 2010-01-12 00:36:12 +0000
@@ -0,0 +1,30 @@
1#!/usr/bin/perl -w
2
3use strict;
4use CGI;
5
6sub main {
7 my $cgi = new CGI;
8
9 print $cgi->start_html('Libmemcached Documentation') . "\n";
10 print $cgi->h1('Libmemcached Documentation') . "\n";
11
12 print $cgi->a({ href => "libmemcached.html" }, "Introduction to Libmemcached") . $cgi->br() . "\n";
13 print $cgi->a({ href => "libmemcached_examples.html" }, "Libmemcached Examples") . $cgi->br() . "\n";
14 print $cgi->br() . "\n";
15 print $cgi->br() . "\n";
16
17 foreach (@ARGV)
18 {
19 my $url= $_;
20 my $name= $_;
21 $name =~ s/\.html//g;
22 next if $name eq 'index';
23 next if $name eq 'libmemcached';
24 next if $name eq 'libmemcached_examples';
25 print "<li\>" . $cgi->a({ href => $url }, $name) . $cgi->br() . "\n";
26 }
27 print $cgi->end_html;
28}
29
30main();
031
=== modified file 'docs/memcached_analyze.pod'
--- docs/memcached_analyze.pod 2009-12-16 18:53:44 +0000
+++ docs/memcached_analyze.pod 2010-01-12 00:36:12 +0000
@@ -40,7 +40,7 @@
40=head1 HOME40=head1 HOME
4141
42To find out more information please check:42To find out more information please check:
43L<http://tangent.org/552/libmemcached.html>43L<https://launchpad.net/libmemcached>
4444
45=head1 AUTHOR45=head1 AUTHOR
4646
4747
=== modified file 'docs/memcached_auto.pod'
--- docs/memcached_auto.pod 2009-12-16 18:53:44 +0000
+++ docs/memcached_auto.pod 2010-01-12 00:36:12 +0000
@@ -124,7 +124,7 @@
124=head1 HOME124=head1 HOME
125125
126To find out more information please check:126To find out more information please check:
127L<http://tangent.org/552/libmemcached.html>127L<https://launchpad.net/libmemcached>
128128
129=head1 AUTHOR129=head1 AUTHOR
130130
131131
=== modified file 'docs/memcached_behavior.pod'
--- docs/memcached_behavior.pod 2010-01-02 04:50:19 +0000
+++ docs/memcached_behavior.pod 2010-01-12 00:36:12 +0000
@@ -234,7 +234,7 @@
234=head1 HOME234=head1 HOME
235235
236To find out more information please check:236To find out more information please check:
237L<http://tangent.org/552/libmemcached.html>237L<https://launchpad.net/libmemcached>
238238
239=head1 AUTHOR239=head1 AUTHOR
240240
241241
=== modified file 'docs/memcached_callback.pod'
--- docs/memcached_callback.pod 2009-12-16 18:53:44 +0000
+++ docs/memcached_callback.pod 2010-01-12 00:36:12 +0000
@@ -109,7 +109,7 @@
109=head1 HOME109=head1 HOME
110110
111To find out more information please check:111To find out more information please check:
112L<http://tangent.org/552/libmemcached.html>112L<https://launchpad.net/libmemcached>
113113
114=head1 AUTHOR114=head1 AUTHOR
115115
116116
=== modified file 'docs/memcached_create.pod'
--- docs/memcached_create.pod 2009-12-16 18:53:44 +0000
+++ docs/memcached_create.pod 2010-01-12 00:36:12 +0000
@@ -1,6 +1,6 @@
1=head1 NAME1=head1 NAME
22
3memcached_create, memcached_free - Create a memcached_st structure3memcached_create, memcached_free, memcached_clone, memcached_servers_reset- Create a memcached_st structure
44
5=head1 LIBRARY5=head1 LIBRARY
66
@@ -16,6 +16,8 @@
1616
17 memcached_st *memcached_clone (memcached_st *destination, memcached_st *source);17 memcached_st *memcached_clone (memcached_st *destination, memcached_st *source);
1818
19 void memcached_servers_reset(memcached_st);
20
19=head1 DESCRIPTION21=head1 DESCRIPTION
2022
21memcached_create() is used to create a C<memcached_st> structure that will then23memcached_create() is used to create a C<memcached_st> structure that will then
@@ -28,6 +30,9 @@
28the argument for the source to clone, it is the same as a call to memcached_create().30the argument for the source to clone, it is the same as a call to memcached_create().
29If the destination argument is NULL a C<memcached_st> will be allocated for you.31If the destination argument is NULL a C<memcached_st> will be allocated for you.
3032
33memcached_servers_reset() allows you to zero out the list of servers that
34the memcached_st has.
35
31To clean up memory associated with a C<memcached_st> structure you should pass36To clean up memory associated with a C<memcached_st> structure you should pass
32it to memcached_free() when you are finished using it. memcached_free() is37it to memcached_free() when you are finished using it. memcached_free() is
33the only way to make sure all memory is deallocated when you finish using38the only way to make sure all memory is deallocated when you finish using
@@ -48,7 +53,7 @@
48=head1 HOME53=head1 HOME
4954
50To find out more information please check:55To find out more information please check:
51L<http://tangent.org/552/libmemcached.html>56L<https://launchpad.net/libmemcached>
5257
53=head1 AUTHOR58=head1 AUTHOR
5459
5560
=== modified file 'docs/memcached_delete.pod'
--- docs/memcached_delete.pod 2009-12-16 18:53:44 +0000
+++ docs/memcached_delete.pod 2010-01-12 00:36:12 +0000
@@ -44,7 +44,7 @@
44=head1 HOME44=head1 HOME
4545
46To find out more information please check:46To find out more information please check:
47L<http://tangent.org/552/libmemcached.html>47L<https://launchpad.net/libmemcached>
4848
49=head1 AUTHOR49=head1 AUTHOR
5050
5151
=== modified file 'docs/memcached_dump.pod'
--- docs/memcached_dump.pod 2009-12-16 18:53:44 +0000
+++ docs/memcached_dump.pod 2010-01-12 00:36:12 +0000
@@ -39,7 +39,7 @@
39=head1 HOME39=head1 HOME
4040
41To find out more information please check:41To find out more information please check:
42L<http://tangent.org/552/libmemcached.html>42L<https://launchpad.net/libmemcached>
4343
44=head1 AUTHOR44=head1 AUTHOR
4545
4646
=== modified file 'docs/memcached_flush.pod'
--- docs/memcached_flush.pod 2009-12-16 18:53:44 +0000
+++ docs/memcached_flush.pod 2010-01-12 00:36:12 +0000
@@ -32,7 +32,7 @@
32=head1 HOME32=head1 HOME
3333
34To find out more information please check:34To find out more information please check:
35L<http://tangent.org/552/libmemcached.html>35L<https://launchpad.net/libmemcached>
3636
37=head1 AUTHOR37=head1 AUTHOR
3838
3939
=== modified file 'docs/memcached_flush_buffers.pod'
--- docs/memcached_flush_buffers.pod 2009-12-16 18:53:44 +0000
+++ docs/memcached_flush_buffers.pod 2010-01-12 00:36:12 +0000
@@ -28,11 +28,11 @@
28=head1 HOME28=head1 HOME
2929
30To find out more information please check:30To find out more information please check:
31L<http://tangent.org/552/libmemcached.html>31L<https://launchpad.net/libmemcached>
3232
33=head1 AUTHOR33=head1 AUTHOR
3434
35Trond Norbye, E<lt>trond.norbye@sun.comE<gt>35Trond Norbye, E<lt>trond.norbye@gmail.comE<gt>
3636
37=head1 SEE ALSO37=head1 SEE ALSO
3838
3939
=== modified file 'docs/memcached_generate_hash_value.pod'
--- docs/memcached_generate_hash_value.pod 2010-01-02 04:50:19 +0000
+++ docs/memcached_generate_hash_value.pod 2010-01-12 00:36:12 +0000
@@ -46,7 +46,7 @@
46=head1 HOME46=head1 HOME
4747
48To find out more information please check: 48To find out more information please check:
49L<http://tangent.org/552/libmemcached.html>49L<https://launchpad.net/libmemcached>
5050
51=head1 AUTHOR51=head1 AUTHOR
5252
5353
=== modified file 'docs/memcached_get.pod'
--- docs/memcached_get.pod 2009-12-16 18:53:44 +0000
+++ docs/memcached_get.pod 2010-01-12 00:36:12 +0000
@@ -157,7 +157,7 @@
157=head1 HOME157=head1 HOME
158158
159To find out more information please check:159To find out more information please check:
160L<http://tangent.org/552/libmemcached.html>160L<https://launchpad.net/libmemcached>
161161
162=head1 AUTHOR162=head1 AUTHOR
163163
164164
=== modified file 'docs/memcached_memory_allocators.pod'
--- docs/memcached_memory_allocators.pod 2009-12-16 18:53:44 +0000
+++ docs/memcached_memory_allocators.pod 2010-01-12 00:36:12 +0000
@@ -67,11 +67,11 @@
67=head1 HOME67=head1 HOME
6868
69To find out more information please check:69To find out more information please check:
70L<http://tangent.org/552/libmemcached.html>70L<https://launchpad.net/libmemcached>
7171
72=head1 AUTHOR72=head1 AUTHOR
7373
74Trond Norbye, E<lt>trond.norbye@sun.comE<gt>74Trond Norbye, E<lt>trond.norbye@gmail.comE<gt>
7575
76=head1 SEE ALSO76=head1 SEE ALSO
7777
7878
=== modified file 'docs/memcached_pool.pod'
--- docs/memcached_pool.pod 2009-12-16 18:53:44 +0000
+++ docs/memcached_pool.pod 2010-01-12 00:36:12 +0000
@@ -86,11 +86,11 @@
86=head1 HOME86=head1 HOME
8787
88To find out more information please check:88To find out more information please check:
89L<http://tangent.org/552/libmemcached.html>89L<https://launchpad.net/libmemcached>
9090
91=head1 AUTHOR91=head1 AUTHOR
9292
93Trond Norbye, E<lt>trond.norbye@sun.comE<gt>93Trond Norbye, E<lt>trond.norbye@gmail.comE<gt>
9494
95=head1 SEE ALSO95=head1 SEE ALSO
9696
9797
=== modified file 'docs/memcached_quit.pod'
--- docs/memcached_quit.pod 2009-05-12 15:56:43 +0000
+++ docs/memcached_quit.pod 2010-01-12 00:36:12 +0000
@@ -33,7 +33,7 @@
33=head1 HOME33=head1 HOME
3434
35To find out more information please check:35To find out more information please check:
36L<http://tangent.org/552/libmemcached.html>36L<https://launchpad.net/libmemcached>
3737
38=head1 AUTHOR38=head1 AUTHOR
3939
4040
=== modified file 'docs/memcached_result_st.pod'
--- docs/memcached_result_st.pod 2009-12-16 18:53:44 +0000
+++ docs/memcached_result_st.pod 2010-01-12 00:36:12 +0000
@@ -101,7 +101,7 @@
101=head1 HOME101=head1 HOME
102102
103To find out more information please check:103To find out more information please check:
104L<http://tangent.org/552/libmemcached.html>104L<https://launchpad.net/libmemcached>
105105
106=head1 AUTHOR106=head1 AUTHOR
107107
108108
=== modified file 'docs/memcached_server_st.pod'
--- docs/memcached_server_st.pod 2009-12-16 18:53:44 +0000
+++ docs/memcached_server_st.pod 2010-01-12 00:36:12 +0000
@@ -61,7 +61,7 @@
61=head1 HOME61=head1 HOME
6262
63To find out more information please check:63To find out more information please check:
64L<http://tangent.org/552/libmemcached.html>64L<https://launchpad.net/libmemcached>
6565
66=head1 AUTHOR66=head1 AUTHOR
6767
6868
=== modified file 'docs/memcached_servers.pod'
--- docs/memcached_servers.pod 2009-12-19 01:28:01 +0000
+++ docs/memcached_servers.pod 2010-01-12 00:36:12 +0000
@@ -1,6 +1,6 @@
1=head1 NAME1=head1 NAME
22
3memcached_server_count, memcached_server_list, memcached_server_add, memcached_server_push, memcached_server_get_last_disconnect - Manage server list3memcached_server_count, memcached_server_list, memcached_server_add, memcached_server_push, memcached_server_get_last_disconnect, memcached_server_cursor - Manage server list
44
5=head1 LIBRARY5=head1 LIBRARY
66
@@ -10,7 +10,7 @@
1010
11 #include <memcached.h>11 #include <memcached.h>
1212
13 unsigned int memcached_server_count (memcached_st *ptr);13 uint32_t memcached_server_count (memcached_st *ptr);
1414
15 memcached_server_st *15 memcached_server_st *
16 memcached_server_list (memcached_st *ptr);16 memcached_server_list (memcached_st *ptr);
@@ -41,6 +41,12 @@
41 memcached_server_st *41 memcached_server_st *
42 memcached_server_get_last_disconnect (memcached_st *ptr)42 memcached_server_get_last_disconnect (memcached_st *ptr)
4343
44 memcached_return_t
45 memcached_server_cursor(memcached_st *ptr,
46 memcached_server_fn *callback,
47 void *context,
48 uint32_t number_of_callbacks);
49
4450
45=head1 DESCRIPTION51=head1 DESCRIPTION
4652
@@ -90,6 +96,13 @@
90server is currently dead but if the library is reporting a server is,96server is currently dead but if the library is reporting a server is,
91the returned server is a very good candidate.97the returned server is a very good candidate.
9298
99memcached_server_cursor() takes a memcached_st and loops through the
100list of hosts currently in the cursor calling the list of callback
101functions provided. You can optionally pass in a value via
102context which will be provided to each callback function. An error
103return from any callback will terminate the loop. memcached_server_cursor()
104is passed the original caller memcached_st in its current state.
105
93=head1 RETURN106=head1 RETURN
94107
95Varies, see particular functions.108Varies, see particular functions.
@@ -97,7 +110,7 @@
97=head1 HOME110=head1 HOME
98111
99To find out more information please check:112To find out more information please check:
100L<http://tangent.org/552/libmemcached.html>113L<https://launchpad.net/libmemcached>
101114
102=head1 AUTHOR115=head1 AUTHOR
103116
104117
=== modified file 'docs/memcached_set.pod'
--- docs/memcached_set.pod 2009-12-16 18:53:44 +0000
+++ docs/memcached_set.pod 2010-01-12 00:36:12 +0000
@@ -173,7 +173,7 @@
173=head1 HOME173=head1 HOME
174174
175To find out more information please check:175To find out more information please check:
176L<http://tangent.org/552/libmemcached.html>176L<https://launchpad.net/libmemcached>
177177
178=head1 AUTHOR178=head1 AUTHOR
179179
180180
=== modified file 'docs/memcached_stats.pod'
--- docs/memcached_stats.pod 2009-12-16 18:53:44 +0000
+++ docs/memcached_stats.pod 2010-01-12 00:36:12 +0000
@@ -70,7 +70,7 @@
70=head1 HOME70=head1 HOME
7171
72To find out more information please check:72To find out more information please check:
73L<http://tangent.org/552/libmemcached.html>73L<https://launchpad.net/libmemcached>
7474
75=head1 AUTHOR75=head1 AUTHOR
7676
7777
=== modified file 'docs/memcached_strerror.pod'
--- docs/memcached_strerror.pod 2009-12-19 01:28:01 +0000
+++ docs/memcached_strerror.pod 2010-01-12 00:36:12 +0000
@@ -33,7 +33,7 @@
33=head1 HOME33=head1 HOME
3434
35To find out more information please check:35To find out more information please check:
36L<http://tangent.org/552/libmemcached.html>36L<https://launchpad.net/libmemcached>
3737
38=head1 AUTHOR38=head1 AUTHOR
3939
4040
=== modified file 'docs/memcached_user_data.pod'
--- docs/memcached_user_data.pod 2009-12-16 18:53:44 +0000
+++ docs/memcached_user_data.pod 2010-01-12 00:36:12 +0000
@@ -36,11 +36,11 @@
36=head1 HOME36=head1 HOME
3737
38To find out more information please check:38To find out more information please check:
39L<http://tangent.org/552/libmemcached.html>39L<https://launchpad.net/libmemcached>
4040
41=head1 AUTHOR41=head1 AUTHOR
4242
43Trond Norbye, E<lt>trond.norbye@sun.comE<gt>43Trond Norbye, E<lt>trond.norbye@gmail.comE<gt>
4444
45=head1 SEE ALSO45=head1 SEE ALSO
4646
4747
=== modified file 'docs/memcached_verbosity.pod'
--- docs/memcached_verbosity.pod 2009-12-16 18:53:44 +0000
+++ docs/memcached_verbosity.pod 2010-01-12 00:36:12 +0000
@@ -28,7 +28,7 @@
28=head1 HOME28=head1 HOME
2929
30To find out more information please check:30To find out more information please check:
31L<http://tangent.org/552/libmemcached.html>31L<https://launchpad.net/libmemcached>
3232
33=head1 AUTHOR33=head1 AUTHOR
3434
3535
=== modified file 'docs/memcached_version.pod'
--- docs/memcached_version.pod 2009-12-16 18:53:44 +0000
+++ docs/memcached_version.pod 2010-01-12 00:36:12 +0000
@@ -42,7 +42,7 @@
42=head1 HOME42=head1 HOME
4343
44To find out more information please check:44To find out more information please check:
45L<http://tangent.org/552/libmemcached.html>45L<https://launchpad.net/libmemcached>
4646
47=head1 AUTHOR47=head1 AUTHOR
4848
4949
=== modified file 'docs/memcapable.pod'
--- docs/memcapable.pod 2010-01-02 04:50:19 +0000
+++ docs/memcapable.pod 2010-01-12 00:36:12 +0000
@@ -47,11 +47,11 @@
47=head1 HOME47=head1 HOME
4848
49To find out more information please check:49To find out more information please check:
50L<http://tangent.org/552/libmemcached.html>50L<https://launchpad.net/libmemcached>
5151
52=head1 AUTHOR52=head1 AUTHOR
5353
54Trond Norbye, E<lt>trond.norbye@sun.comE<gt>54Trond Norbye, E<lt>trond.norbye@gmail.comE<gt>
5555
56=head1 SEE ALSO56=head1 SEE ALSO
5757
5858
=== modified file 'docs/memcat.pod'
--- docs/memcat.pod 2009-05-11 12:07:17 +0000
+++ docs/memcat.pod 2010-01-12 00:36:12 +0000
@@ -21,7 +21,7 @@
21=head1 HOME21=head1 HOME
2222
23To find out more information please check:23To find out more information please check:
24L<http://tangent.org/552/libmemcached.html>24L<https://launchpad.net/libmemcached>
2525
26=head1 AUTHOR26=head1 AUTHOR
2727
2828
=== modified file 'docs/memcp.pod'
--- docs/memcp.pod 2009-05-11 12:07:17 +0000
+++ docs/memcp.pod 2010-01-12 00:36:12 +0000
@@ -24,7 +24,7 @@
24=head1 HOME24=head1 HOME
2525
26To find out more information please check:26To find out more information please check:
27L<http://tangent.org/552/libmemcached.html>27L<https://launchpad.net/libmemcached>
2828
29=head1 AUTHOR29=head1 AUTHOR
3030
3131
=== modified file 'docs/memdump.pod'
--- docs/memdump.pod 2009-05-19 20:32:02 +0000
+++ docs/memdump.pod 2010-01-12 00:36:12 +0000
@@ -17,7 +17,7 @@
17=head1 HOME17=head1 HOME
1818
19To find out more information please check:19To find out more information please check:
20L<http://tangent.org/552/libmemcached.html>20L<https://launchpad.net/libmemcached>
2121
22=head1 AUTHOR22=head1 AUTHOR
2323
2424
=== modified file 'docs/memerror.pod'
--- docs/memerror.pod 2009-05-11 12:07:17 +0000
+++ docs/memerror.pod 2010-01-12 00:36:12 +0000
@@ -16,7 +16,7 @@
16=head1 HOME16=head1 HOME
1717
18To find out more infoerroration please check:18To find out more infoerroration please check:
19L<http://tangent.org/552/libmemcached.html>19L<https://launchpad.net/libmemcached>
2020
21=head1 AUTHOR21=head1 AUTHOR
2222
2323
=== modified file 'docs/memflush.pod'
--- docs/memflush.pod 2009-05-11 12:07:17 +0000
+++ docs/memflush.pod 2010-01-12 00:36:12 +0000
@@ -19,7 +19,7 @@
19=head1 HOME19=head1 HOME
2020
21To find out more information please check:21To find out more information please check:
22L<http://tangent.org/552/libmemcached.html>22L<https://launchpad.net/libmemcached>
2323
24=head1 AUTHOR24=head1 AUTHOR
2525
2626
=== modified file 'docs/memrm.pod'
--- docs/memrm.pod 2009-05-11 12:07:17 +0000
+++ docs/memrm.pod 2010-01-12 00:36:12 +0000
@@ -18,7 +18,7 @@
18=head1 HOME18=head1 HOME
1919
20To find out more information please check:20To find out more information please check:
21L<http://tangent.org/552/libmemcached.html>21L<https://launchpad.net/libmemcached>
2222
23=head1 AUTHOR23=head1 AUTHOR
2424
2525
=== modified file 'docs/memslap.pod'
--- docs/memslap.pod 2010-01-05 22:55:54 +0000
+++ docs/memslap.pod 2010-01-12 00:36:12 +0000
@@ -88,14 +88,14 @@
8888
89=head2 Effective implementation of generating key and value89=head2 Effective implementation of generating key and value
9090
91In order to improve time efficiency and space efficiency, asynchronous91In order to improve time efficiency and space efficiency,
92memslap creates a random characters table with 10M characters. All the92memslap creates a random characters table with 10M characters. All the
93suffixes of keys and values are generated from this random characters table.93suffixes of keys and values are generated from this random characters table.
9494
95Memslap uses the offset in the character table and the length95Memslap uses the offset in the character table and the length
96of the string to identify a string. It can save much memory.96of the string to identify a string. It can save much memory.
97Each key contains two parts, a prefix and a suffix. The prefix is an97Each key contains two parts, a prefix and a suffix. The prefix is an
98uint64_t, 8 bytes. In order to verify the data set before, asynchronous98uint64_t, 8 bytes. In order to verify the data set before,
99memslap need to ensure each key is unique, so it uses the prefix to identify99memslap need to ensure each key is unique, so it uses the prefix to identify
100a key. The prefix cannot include illegal characters, such as ‘\r’, ‘\n’,100a key. The prefix cannot include illegal characters, such as ‘\r’, ‘\n’,
101‘\0’ and ‘ ‘. And memslap has an algorithm to ensure that. 101‘\0’ and ‘ ‘. And memslap has an algorithm to ensure that.
@@ -188,7 +188,7 @@
188188
189=back189=back
190190
191The user must specify one server at least to run asynchronous memslap. The191The user must specify one server at least to run memslap. The
192rest of the parameters have default values, as shown below:192rest of the parameters have default values, as shown below:
193193
194Thread number = 1 Concurrency = 16194Thread number = 1 Concurrency = 16
@@ -221,7 +221,7 @@
221221
222All the distributions are read from the configuration file specified by user222All the distributions are read from the configuration file specified by user
223with “—cfg_cmd” option. If the user does not specify a configuration file,223with “—cfg_cmd” option. If the user does not specify a configuration file,
224asynchronous memslap will run with the default distribution (key size = 64,224memslap will run with the default distribution (key size = 64,
225value size = 1024, get/set = 9:1). For information on how to edit the225value size = 1024, get/set = 9:1). For information on how to edit the
226configuration file, refer to the “Configuration File” section.226configuration file, refer to the “Configuration File” section.
227227
@@ -232,22 +232,22 @@
232The minimum value size is 1 bytes; the maximum value size is 1M bytes. The232The minimum value size is 1 bytes; the maximum value size is 1M bytes. The
233precision of proportion is 0.001. The proportion of distribution will be233precision of proportion is 0.001. The proportion of distribution will be
234rounded to 3 decimal places.234rounded to 3 decimal places.
235Currently, asynchronous memslap only supports set and get commands. And it235Currently, memslap only supports set and get commands. And it
236supports 100% set and 100% get. For 100% get, it will preset some objects to236supports 100% set and 100% get. For 100% get, it will preset some objects to
237the server.237the server.
238238
239=head2 Multi-thread and concurrency239=head2 Multi-thread and concurrency
240240
241The high performance of asynchronous memslap benefits from the special241The high performance of memslap benefits from the special
242schedule of thread and concurrency. It’s important to specify the proper242schedule of thread and concurrency. It’s important to specify the proper
243number of them. The default number of threads is 1; the default number of243number of them. The default number of threads is 1; the default number of
244concurrency is 16. The user can use “—threads” and “--concurrency” to244concurrency is 16. The user can use “—threads” and “--concurrency” to
245specify these variables.245specify these variables.
246246
247If the system supports setting CPU affinity and the number of threads247If the system supports setting CPU affinity and the number of threads
248specified by the user is greater than 1, asynchronous memslap will try to248specified by the user is greater than 1, memslap will try to
249bind each thread to a different CPU core. So if you want to get the best249bind each thread to a different CPU core. So if you want to get the best
250performance asynchronous memslap, it is better to specify the number of250performance memslap, it is better to specify the number of
251thread equal to the number of CPU cores. The number of threads specified by251thread equal to the number of CPU cores. The number of threads specified by
252the user can also be less or greater than the number of CPU cores. Because252the user can also be less or greater than the number of CPU cores. Because
253of the limitation of implementation, the number of concurrencies could be253of the limitation of implementation, the number of concurrencies could be
@@ -277,15 +277,15 @@
277277
278--threads=24 --concurrency=288278--threads=24 --concurrency=288
279279
280The asynchronous memslap performs very well, when280The memslap performs very well, when
281used to test the performance of memcached servers.281used to test the performance of memcached servers.
282Most of the time, the bottleneck is the network or282Most of the time, the bottleneck is the network or
283the server. If for some reason the user wants to283the server. If for some reason the user wants to
284limit the performance of asynchronous memslap, there284limit the performance of memslap, there
285are two ways to do this:285are two ways to do this:
286286
287Decrease the number of threads and concurrencies.287Decrease the number of threads and concurrencies.
288Use the option “--tps” that Asynchronous memslap288Use the option “--tps” that memslap
289provides to limit the throughput. This option allows289provides to limit the throughput. This option allows
290the user to get the expected throughput. For290the user to get the expected throughput. For
291example, assume that the maximum throughput is 50291example, assume that the maximum throughput is 50
@@ -298,7 +298,7 @@
298Most of the time, the user does not need to specify the window size. The298Most of the time, the user does not need to specify the window size. The
299default window size is 10k. For Schooner Memcached, the user can specify299default window size is 10k. For Schooner Memcached, the user can specify
300different window sizes to get different cache miss rates based on the test300different window sizes to get different cache miss rates based on the test
301case. Asynchronous memslap supports cache miss rate between 0% and 100%.301case. Memslap supports cache miss rate between 0% and 100%.
302If you use this utility to test the performance of Schooner Memcached, you302If you use this utility to test the performance of Schooner Memcached, you
303can specify a proper window size to get the expected cache miss rate. The303can specify a proper window size to get the expected cache miss rate. The
304formula for calculating window size is as follows:304formula for calculating window size is as follows:
@@ -341,7 +341,7 @@
341341
342=head2 Verification342=head2 Verification
343343
344Asynchronous memslap supports both data verification and expire-time344Memslap supports both data verification and expire-time
345verification. The user can use "--verify=" or "-v" to specify the proportion345verification. The user can use "--verify=" or "-v" to specify the proportion
346of data verification. In theory, it supports 100% data verification. The346of data verification. In theory, it supports 100% data verification. The
347user can use "--exp_verify=" or "-e" to specify the proportion of347user can use "--exp_verify=" or "-e" to specify the proportion of
@@ -351,14 +351,14 @@
351351
352For example: --exp_verify=0.01 –verify=0.1 , it means that 1% of the objects 352For example: --exp_verify=0.01 –verify=0.1 , it means that 1% of the objects
353set with expire-time, 10% of the objects gotten will be verified. If the353set with expire-time, 10% of the objects gotten will be verified. If the
354objects are gotten, asynchronous memslap will verify the expire-time and354objects are gotten, memslap will verify the expire-time and
355value. 355value.
356356
357=head2 multi-servers and multi-clients357=head2 multi-servers and multi-clients
358358
359Asynchronous memslap supports multi-servers based on self-governed thread.359Memslap supports multi-servers based on self-governed thread.
360There is a limitation that the number of servers cannot be greater than the360There is a limitation that the number of servers cannot be greater than the
361number of threads. Asynchronous memslap assigns one thread to handle one361number of threads. Memslap assigns one thread to handle one
362server at least. The user can use the "--servers=" or "-s" option to specify362server at least. The user can use the "--servers=" or "-s" option to specify
363multi-servers. 363multi-servers.
364364
@@ -371,18 +371,18 @@
371and 4 handle server 1 (10.1.1.2); and thread 2 and 5 handle server 2371and 4 handle server 1 (10.1.1.2); and thread 2 and 5 handle server 2
372(10.1.1.3). 372(10.1.1.3).
373373
374All the threads and concurrencies in asynchronous memslap are self-governed.374All the threads and concurrencies in memslap are self-governed.
375375
376So is asynchronous memslap. The user can start up several asynchronous376So is memslap. The user can start up several
377memslap instances. The user can run asynchronous memslap on different client377memslap instances. The user can run memslap on different client
378machines to communicate with the same memcached server at the same. It is378machines to communicate with the same memcached server at the same. It is
379recommended that the user start different asynchronous memslap on different379recommended that the user start different memslap on different
380machines using the same configuration. 380machines using the same configuration.
381381
382=head2 Run with execute number mode or time mode382=head2 Run with execute number mode or time mode
383383
384The default asynchronous memslap runs with time mode. The default run time384The default memslap runs with time mode. The default run time
385is 10 minutes. If it times out, asynchronous memslap will exit. Do not385is 10 minutes. If it times out, memslap will exit. Do not
386specify both execute number mode and time mode at the same time; just386specify both execute number mode and time mode at the same time; just
387specify one instead. 387specify one instead.
388388
@@ -400,7 +400,7 @@
400400
401--stat_freq=20s401--stat_freq=20s
402402
403asynchronous memslap will dump the statistics of the commands (get and set) at the frequency of every 20403Memslap will dump the statistics of the commands (get and set) at the frequency of every 20
404seconds. 404seconds.
405405
406For more information on the format of dumping statistic information, refer to “Format of Output” section.406For more information on the format of dumping statistic information, refer to “Format of Output” section.
@@ -408,23 +408,22 @@
408=head2 Multi-get408=head2 Multi-get
409409
410The user can use "--division=" or "-d" to specify multi-get keys count.410The user can use "--division=" or "-d" to specify multi-get keys count.
411Asynchronous memslap by default does single get with TCP. Asynchronous411Memslap by default does single get with TCP. Memslap also supports data
412memslap also supports data verification and expire-time verification for412verification and expire-time verification for multi-get.
413multi-get.
414413
415Asynchronous memslap supports multi-get with both TCP and UDP. Because of414Memslap supports multi-get with both TCP and UDP. Because of
416the different implementation of the ASCII protocol and binary protocol,415the different implementation of the ASCII protocol and binary protocol,
417there are some differences between the two. For the ASCII protocol,416there are some differences between the two. For the ASCII protocol,
418asynchronous memslap sends one “multi-get” to the server once. For the417memslap sends one “multi-get” to the server once. For the
419binary protocol, asynchronous memslap sends several single get commands418binary protocol, memslap sends several single get commands
420together as “multi-get” to the server.419together as “multi-get” to the server.
421420
422=head2 UDP and TCP421=head2 UDP and TCP
423422
424Asynchronous memslap supports both UDP and TCP. For TCP, asynchronous423Memslap supports both UDP and TCP. For TCP,
425memslap does not reconnect the memcached server if socket connections are424memslap does not reconnect the memcached server if socket connections are
426lost. If all the socket connections are lost or memcached server crashes,425lost. If all the socket connections are lost or memcached server crashes,
427asynchronous memslap will exit. If the user specifies the “--reconnect”426memslap will exit. If the user specifies the “--reconnect”
428option when socket connections are lost, it will reconnect them. 427option when socket connections are lost, it will reconnect them.
429428
430User can use “--udp” to enable the UDP feature, but UDP comes with some429User can use “--udp” to enable the UDP feature, but UDP comes with some
@@ -449,10 +448,10 @@
449448
450For example: --facebook --division=50 --conn_sock=200449For example: --facebook --division=50 --conn_sock=200
451450
452The above command means that asynchronous memslap will do facebook test,451The above command means that memslap will do facebook test,
453each concurrency has 200 socket TCP connections and one UDP socket.452each concurrency has 200 socket TCP connections and one UDP socket.
454453
455Asynchronous memslap sets objects with the TCP socket, and multi-gets 50454Memslap sets objects with the TCP socket, and multi-gets 50
456objects once with the UDP socket.455objects once with the UDP socket.
457456
458If you specify "--division=50", the key size must be less that 25 bytes457If you specify "--division=50", the key size must be less that 25 bytes
@@ -468,16 +467,16 @@
468--servers=10.1.1.1:11211,10.1.1.2:11212 –rep_write=2467--servers=10.1.1.1:11211,10.1.1.2:11212 –rep_write=2
469468
470The above command means that there are 2 replication memcached servers,469The above command means that there are 2 replication memcached servers,
471asynchronous memslap will set objects to both server 0 and server 1, get470memslap will set objects to both server 0 and server 1, get
472objects which are set to server 0 before from server 1, and also get objects471objects which are set to server 0 before from server 1, and also get objects
473which are set to server 1 before from server 0. If server 0 crashes,472which are set to server 1 before from server 0. If server 0 crashes,
474asynchronous memslap will only get objects from server 1. If server 0 comes473memslap will only get objects from server 1. If server 0 comes
475back to life again, asynchronous memslap will reconnect server 0. If both474back to life again, memslap will reconnect server 0. If both
476server 0 and server 1 crash, asynchronous memslap will exit.475server 0 and server 1 crash, memslap will exit.
477476
478=head2 Supports thousands of TCP connections477=head2 Supports thousands of TCP connections
479478
480Start asynchronous memslap with "--conn_sock=" or "-n" to enable this479Start memslap with "--conn_sock=" or "-n" to enable this
481feature. Make sure that your system can support opening thousands of files480feature. Make sure that your system can support opening thousands of files
482and creating thousands of sockets. However, this feature does not support481and creating thousands of sockets. However, this feature does not support
483reconnection if sockets disconnect. 482reconnection if sockets disconnect.
@@ -486,14 +485,14 @@
486485
487--threads=8 --concurrency=128 --conn_sock=128486--threads=8 --concurrency=128 --conn_sock=128
488487
489The above command means that asynchronous memslap starts up 8 threads, each488The above command means that memslap starts up 8 threads, each
490thread has 16 concurrencies, each concurrency has 128 TCP socket489thread has 16 concurrencies, each concurrency has 128 TCP socket
491connections, and the total number of TCP socket connections is 128 * 128 =490connections, and the total number of TCP socket connections is 128 * 128 =
49216384.49116384.
493492
494=head2 Supports binary protocol493=head2 Supports binary protocol
495494
496Start asynchronous memslap with "--binary" or "-B" options to enable this495Start memslap with "--binary" or "-B" options to enable this
497feature. It supports all the above features except UDP, because the latest496feature. It supports all the above features except UDP, because the latest
498memcached 1.3.3 does not implement binary UDP protocol.497memcached 1.3.3 does not implement binary UDP protocol.
499498
@@ -501,7 +500,7 @@
501500
502--binary501--binary
503502
504Since memcached 1.3.3 doesn't implement binary UDP protocol, asynchronous503Since memcached 1.3.3 doesn't implement binary UDP protocol,
505memslap does not support UDP. In addition, memcached 1.3.3 does not support504memslap does not support UDP. In addition, memcached 1.3.3 does not support
506multi-get. If you specify "--division=50" option, it just sends 50 get505multi-get. If you specify "--division=50" option, it just sends 50 get
507commands together as “mulit-get” to the server.506commands together as “mulit-get” to the server.
@@ -520,7 +519,7 @@
520 #start_len must be equal to or greater than 16519 #start_len must be equal to or greater than 16
521 #end_len must be equal to or less than 250520 #end_len must be equal to or less than 250
522 #start_len must be equal to or greater than end_len521 #start_len must be equal to or greater than end_len
523 #asynchronous memslap will generate keys according to the key range522 #memslap will generate keys according to the key range
524 #proportion: indicates keys generated from one range accounts for the total523 #proportion: indicates keys generated from one range accounts for the total
525 generated keys 524 generated keys
526 #525 #
@@ -545,7 +544,7 @@
545 #start_len must be equal to or greater than 1544 #start_len must be equal to or greater than 1
546 #end_len must be equal to or less than 1M545 #end_len must be equal to or less than 1M
547 #start_len must be equal to or greater than end_len546 #start_len must be equal to or greater than end_len
548 #asynchronous memslap will generate values according to the value range547 #memslap will generate values according to the value range
549 #proportion: indicates values generated from one range accounts for the548 #proportion: indicates values generated from one range accounts for the
550 total generated values 549 total generated values
551 #550 #
@@ -566,7 +565,7 @@
566 #cmd565 #cmd
567 #cmd_type cmd_proportion566 #cmd_type cmd_proportion
568 #567 #
569 #currently asynchronous memslap only supports get and set command.568 #currently memslap only supports get and set command.
570 #569 #
571 #cmd_type570 #cmd_type
572 #set 0571 #set 0
@@ -587,7 +586,7 @@
587586
588=head1 Format of output587=head1 Format of output
589588
590At the beginning, asynchronous memslap displays some configuration information as follows:589At the beginning, memslap displays some configuration information as follows:
591590
592=over 4591=over 4
593592
@@ -605,21 +604,21 @@
605604
606=back605=back
607606
608=head4 Where607=head2 Where
609608
610=over 4609=over 4
611610
612=item threads count611=item threads count
613612
614The number of threads asynchronous memslap runs with.613The number of threads memslap runs with.
615614
616=item concurrency615=item concurrency
617616
618The number of concurrencies asynchronous memslap runs with.617The number of concurrencies memslap runs with.
619618
620=item run time619=item run time
621620
622How long to run asynchronous memslap.621How long to run memslap.
623622
624=item windows size623=item windows size
625624
@@ -665,7 +664,7 @@
665 117.93 195.60664 117.93 195.60
666 ---------------------------------------------------------------------------------------------------------------------------------665 ---------------------------------------------------------------------------------------------------------------------------------
667666
668=head4 Where667=head2 Where
669668
670=over 4669=over 4
671670
@@ -727,7 +726,7 @@
727726
728=back727=back
729728
730At the end, asynchronous memslap will output something like this:729At the end, memslap will output something like this:
731730
732 ---------------------------------------------------------------------------------------------------------------------------------731 ---------------------------------------------------------------------------------------------------------------------------------
733 Get Statistics (1257956 events)732 Get Statistics (1257956 events)
@@ -780,7 +779,7 @@
780 Run time: 20.0s Ops: 1397754 TPS: 69817 Net_rate: 59.4M/s779 Run time: 20.0s Ops: 1397754 TPS: 69817 Net_rate: 59.4M/s
781 ---------------------------------------------------------------------------------------------------------------------------------780 ---------------------------------------------------------------------------------------------------------------------------------
782781
783=head4 Where782=head2 Where
784783
785=over 4784=over 4
786785
@@ -984,8 +983,6 @@
984=head1 HOME983=head1 HOME
985984
986To find out more information please check:985To find out more information please check:
987L<http://tangent.org/552/libmemcached.html>
988
989L<http://launchpad.org/libmemcached>986L<http://launchpad.org/libmemcached>
990987
991=head1 AUTHORS988=head1 AUTHORS
992989
=== modified file 'docs/memstat.pod'
--- docs/memstat.pod 2009-05-11 12:07:17 +0000
+++ docs/memstat.pod 2010-01-12 00:36:12 +0000
@@ -19,7 +19,7 @@
19=head1 HOME19=head1 HOME
2020
21To find out more information please check:21To find out more information please check:
22L<http://tangent.org/552/libmemcached.html>22L<http://launchpad.org/libmemcached>
2323
24=head1 AUTHOR24=head1 AUTHOR
2525
2626
=== removed file 'libhashkit/Makefile.am'
--- libhashkit/Makefile.am 2009-12-17 17:28:30 +0000
+++ libhashkit/Makefile.am 1970-01-01 00:00:00 +0000
@@ -1,45 +0,0 @@
1# HashKit
2# Copyright (C) 2009 Brian Aker
3# All rights reserved.
4#
5# Use and distribution licensed under the BSD license. See
6# the COPYING file in the parent directory for full text.
7
8lib_LTLIBRARIES= libhashkit.la
9
10libhashkitincludedir= ${includedir}/libhashkit
11
12dist_libhashkitinclude_HEADERS= \
13 algorithm.h \
14 behavior.h \
15 hashkit.h \
16 strerror.h \
17 types.h \
18 visibility.h
19
20noinst_HEADERS= \
21 common.h
22
23libhashkit_la_SOURCES= \
24 crc32.c \
25 behavior.c \
26 default.c \
27 fnv.c \
28 hashkit.c \
29 jenkins.c \
30 ketama.c \
31 md5.c \
32 murmur.c \
33 strerror.c
34
35if INCLUDE_HSIEH_SRC
36libhashkit_la_SOURCES+= hsieh.c
37endif
38
39libhashkit_la_CFLAGS= \
40 ${AM_CFLAGS} \
41 -DBUILDING_HASHKIT
42
43libhashkit_la_LDFLAGS= \
44 $(LIBM) \
45 -version-info $(HASHKIT_LIBRARY_VERSION)
460
=== modified file 'libhashkit/hsieh.c'
--- libhashkit/hsieh.c 2009-12-17 17:28:30 +0000
+++ libhashkit/hsieh.c 2010-01-12 00:36:12 +0000
@@ -1,11 +1,11 @@
1/* By Paul Hsieh (C) 2004, 2005. Covered under the Paul Hsieh1/* By Paul Hsieh (C) 2004, 2005. Covered under the Paul Hsieh
2 * derivative license. 2 * derivative license.
3 * See: http://www.azillionmonkeys.com/qed/weblicense.html for license3 * See: http://www.azillionmonkeys.com/qed/weblicense.html for license
4 * details.4 * details.
5 * http://www.azillionmonkeys.com/qed/hash.html5 * http://www.azillionmonkeys.com/qed/hash.html
6*/6*/
77
8#include "hash_common.h"8#include "common.h"
99
10#undef get16bits10#undef get16bits
11#if (defined(__GNUC__) && defined(__i386__))11#if (defined(__GNUC__) && defined(__i386__))
1212
=== added file 'libhashkit/include.am'
--- libhashkit/include.am 1970-01-01 00:00:00 +0000
+++ libhashkit/include.am 2010-01-12 00:36:12 +0000
@@ -0,0 +1,47 @@
1# vim:ft=automake
2# included from Top Level Makefile.am
3# All paths should be given relative to the root
4#
5# HashKit
6# Copyright (C) 2009 Brian Aker
7# All rights reserved.
8#
9# Use and distribution licensed under the BSD license. See
10# the COPYING file in the parent directory for full text.
11
12lib_LTLIBRARIES+= libhashkit/libhashkit.la
13
14nobase_include_HEADERS+= \
15 libhashkit/algorithm.h \
16 libhashkit/behavior.h \
17 libhashkit/hashkit.h \
18 libhashkit/strerror.h \
19 libhashkit/types.h \
20 libhashkit/visibility.h
21
22noinst_HEADERS+= \
23 libhashkit/common.h
24
25libhashkit_libhashkit_la_SOURCES= \
26 libhashkit/crc32.c \
27 libhashkit/behavior.c \
28 libhashkit/default.c \
29 libhashkit/fnv.c \
30 libhashkit/hashkit.c \
31 libhashkit/jenkins.c \
32 libhashkit/ketama.c \
33 libhashkit/md5.c \
34 libhashkit/murmur.c \
35 libhashkit/strerror.c
36
37if INCLUDE_HSIEH_SRC
38libhashkit_libhashkit_la_SOURCES+= libhashkit/hsieh.c
39endif
40
41libhashkit_libhashkit_la_CFLAGS= \
42 ${AM_CFLAGS} \
43 -DBUILDING_HASHKIT
44
45libhashkit_libhashkit_la_LDFLAGS= \
46 $(LIBM) \
47 -version-info $(HASHKIT_LIBRARY_VERSION)
048
=== modified file 'libmemcached/analyze.c'
--- libmemcached/analyze.c 2010-01-03 01:24:11 +0000
+++ libmemcached/analyze.c 2010-01-12 00:36:12 +0000
@@ -70,7 +70,7 @@
7070
71 *error= MEMCACHED_SUCCESS;71 *error= MEMCACHED_SUCCESS;
72 server_count= memcached_server_count(memc);72 server_count= memcached_server_count(memc);
73 result= (memcached_analysis_st*)calloc(memc->number_of_hosts,73 result= (memcached_analysis_st*)calloc(memcached_server_count(memc),
74 sizeof(memcached_analysis_st));74 sizeof(memcached_analysis_st));
7575
76 if (!result)76 if (!result)
7777
=== modified file 'libmemcached/auto.c'
--- libmemcached/auto.c 2009-12-16 23:01:10 +0000
+++ libmemcached/auto.c 2010-01-12 00:36:12 +0000
@@ -24,7 +24,7 @@
24 unsigned int server_key;24 unsigned int server_key;
25 bool no_reply= ptr->flags.no_reply;25 bool no_reply= ptr->flags.no_reply;
2626
27 unlikely (ptr->hosts == NULL || ptr->number_of_hosts == 0)27 unlikely (ptr->hosts == NULL || memcached_server_count(ptr) == 0)
28 return MEMCACHED_NO_SERVERS;28 return MEMCACHED_NO_SERVERS;
2929
30 if (ptr->flags.verify_key && (memcached_key_test((const char **)&key, &key_length, 1) == MEMCACHED_BAD_KEY_PROVIDED))30 if (ptr->flags.verify_key && (memcached_key_test((const char **)&key, &key_length, 1) == MEMCACHED_BAD_KEY_PROVIDED))
@@ -82,7 +82,7 @@
82 unsigned int server_key;82 unsigned int server_key;
83 bool no_reply= ptr->flags.no_reply;83 bool no_reply= ptr->flags.no_reply;
8484
85 unlikely (ptr->hosts == NULL || ptr->number_of_hosts == 0)85 unlikely (ptr->hosts == NULL || memcached_server_count(ptr) == 0)
86 return MEMCACHED_NO_SERVERS;86 return MEMCACHED_NO_SERVERS;
8787
88 server_key= memcached_generate_hash(ptr, master_key, master_key_length);88 server_key= memcached_generate_hash(ptr, master_key, master_key_length);
8989
=== modified file 'libmemcached/behavior.c'
--- libmemcached/behavior.c 2009-12-17 07:31:42 +0000
+++ libmemcached/behavior.c 2010-01-12 00:36:12 +0000
@@ -90,7 +90,7 @@
90 memcached_quit(ptr);90 memcached_quit(ptr);
91 break;91 break;
92 case MEMCACHED_BEHAVIOR_USE_UDP:92 case MEMCACHED_BEHAVIOR_USE_UDP:
93 if (ptr->number_of_hosts)93 if (memcached_server_count(ptr))
94 {94 {
95 return MEMCACHED_FAILURE;95 return MEMCACHED_FAILURE;
96 }96 }
9797
=== renamed file 'libmemcached/memcached_configure.h.in' => 'libmemcached/configure.h.in'
--- libmemcached/memcached_configure.h.in 2009-12-02 22:04:02 +0000
+++ libmemcached/configure.h.in 2010-01-12 00:36:12 +0000
@@ -1,9 +1,12 @@
1/*1/* LibMemcached
2 * Summary: Preprocessor symbols set from configure we need install-time2 * Copyright (C) 2006-2009 Brian Aker, Trond Norbye
3 *3 * All rights reserved.
4 * Copy: See Copyright for the status of this software.4 *
5 *5 * Use and distribution licensed under the BSD license. See
6 * Author: Trond Norbye6 * the COPYING file in the parent directory for full text.
7 *
8 * Summary: Change the behavior of the memcached connection.
9 *
7 */10 */
811
9#ifndef MEMCACHED_CONFIGURE_H12#ifndef MEMCACHED_CONFIGURE_H
1013
=== modified file 'libmemcached/delete.c'
--- libmemcached/delete.c 2009-12-18 12:07:20 +0000
+++ libmemcached/delete.c 2010-01-12 00:36:12 +0000
@@ -32,7 +32,7 @@
32 unlikely (rc != MEMCACHED_SUCCESS)32 unlikely (rc != MEMCACHED_SUCCESS)
33 return rc;33 return rc;
3434
35 unlikely (ptr->hosts == NULL || ptr->number_of_hosts == 0)35 unlikely (ptr->hosts == NULL || memcached_server_count(ptr) == 0)
36 return MEMCACHED_NO_SERVERS;36 return MEMCACHED_NO_SERVERS;
3737
38 server_key= memcached_generate_hash(ptr, master_key, master_key_length);38 server_key= memcached_generate_hash(ptr, master_key, master_key_length);
@@ -176,7 +176,7 @@
176 for (uint32_t x= 0; x < ptr->number_of_replicas; ++x)176 for (uint32_t x= 0; x < ptr->number_of_replicas; ++x)
177 {177 {
178 ++server_key;178 ++server_key;
179 if (server_key == ptr->number_of_hosts)179 if (server_key == memcached_server_count(ptr))
180 server_key= 0;180 server_key= 0;
181181
182 memcached_server_st* server= &ptr->hosts[server_key];182 memcached_server_st* server= &ptr->hosts[server_key];
183183
=== modified file 'libmemcached/dump.c'
--- libmemcached/dump.c 2009-12-17 23:46:32 +0000
+++ libmemcached/dump.c 2010-01-12 00:36:12 +0000
@@ -15,10 +15,10 @@
15 uint32_t server_key;15 uint32_t server_key;
16 uint32_t x;16 uint32_t x;
1717
18 unlikely (ptr->number_of_hosts == 0)18 unlikely (memcached_server_count(ptr) == 0)
19 return MEMCACHED_NO_SERVERS;19 return MEMCACHED_NO_SERVERS;
2020
21 for (server_key= 0; server_key < ptr->number_of_hosts; server_key++)21 for (server_key= 0; server_key < memcached_server_count(ptr); server_key++)
22 {22 {
23 /* 256 I BELIEVE is the upper limit of slabs */23 /* 256 I BELIEVE is the upper limit of slabs */
24 for (x= 0; x < 256; x++)24 for (x= 0; x < 256; x++)
2525
=== modified file 'libmemcached/flush.c'
--- libmemcached/flush.c 2009-12-16 23:01:10 +0000
+++ libmemcached/flush.c 2010-01-12 00:36:12 +0000
@@ -26,10 +26,10 @@
26 memcached_return_t rc;26 memcached_return_t rc;
27 char buffer[MEMCACHED_DEFAULT_COMMAND_SIZE];27 char buffer[MEMCACHED_DEFAULT_COMMAND_SIZE];
2828
29 unlikely (ptr->number_of_hosts == 0)29 unlikely (memcached_server_count(ptr) == 0)
30 return MEMCACHED_NO_SERVERS;30 return MEMCACHED_NO_SERVERS;
3131
32 for (x= 0; x < ptr->number_of_hosts; x++)32 for (x= 0; x < memcached_server_count(ptr); x++)
33 {33 {
34 bool no_reply= ptr->flags.no_reply;34 bool no_reply= ptr->flags.no_reply;
3535
@@ -56,7 +56,7 @@
56 unsigned int x;56 unsigned int x;
57 protocol_binary_request_flush request= {.bytes= {0}};57 protocol_binary_request_flush request= {.bytes= {0}};
5858
59 unlikely (ptr->number_of_hosts == 0)59 unlikely (memcached_server_count(ptr) == 0)
60 return MEMCACHED_NO_SERVERS;60 return MEMCACHED_NO_SERVERS;
6161
62 request.message.header.request.magic= (uint8_t)PROTOCOL_BINARY_REQ;62 request.message.header.request.magic= (uint8_t)PROTOCOL_BINARY_REQ;
@@ -66,7 +66,7 @@
66 request.message.header.request.bodylen= htonl(request.message.header.request.extlen);66 request.message.header.request.bodylen= htonl(request.message.header.request.extlen);
67 request.message.body.expiration= htonl((uint32_t) expiration);67 request.message.body.expiration= htonl((uint32_t) expiration);
6868
69 for (x= 0; x < ptr->number_of_hosts; x++)69 for (x= 0; x < memcached_server_count(ptr); x++)
70 {70 {
71 if (ptr->flags.no_reply)71 if (ptr->flags.no_reply)
72 request.message.header.request.opcode= PROTOCOL_BINARY_CMD_FLUSHQ;72 request.message.header.request.opcode= PROTOCOL_BINARY_CMD_FLUSHQ;
@@ -80,7 +80,7 @@
80 } 80 }
81 }81 }
8282
83 for (x= 0; x < ptr->number_of_hosts; x++)83 for (x= 0; x < memcached_server_count(ptr); x++)
84 {84 {
85 if (memcached_server_response_count(&ptr->hosts[x]) > 0)85 if (memcached_server_response_count(&ptr->hosts[x]) > 0)
86 (void)memcached_response(&ptr->hosts[x], NULL, 0, NULL);86 (void)memcached_response(&ptr->hosts[x], NULL, 0, NULL);
8787
=== modified file 'libmemcached/flush_buffers.c'
--- libmemcached/flush_buffers.c 2009-12-16 23:01:10 +0000
+++ libmemcached/flush_buffers.c 2010-01-12 00:36:12 +0000
@@ -1,19 +1,19 @@
1#include "common.h"1#include "common.h"
22
3memcached_return_t memcached_flush_buffers(memcached_st *mem)3memcached_return_t memcached_flush_buffers(memcached_st *memc)
4{4{
5 memcached_return_t ret= MEMCACHED_SUCCESS;5 memcached_return_t ret= MEMCACHED_SUCCESS;
66
7 for (uint32_t x= 0; x < mem->number_of_hosts; ++x)7 for (uint32_t x= 0; x < memcached_server_count(memc); ++x)
8 if (mem->hosts[x].write_buffer_offset != 0) 8 if (memc->hosts[x].write_buffer_offset != 0)
9 {9 {
10 if (mem->hosts[x].fd == -1 &&10 if (memc->hosts[x].fd == -1 &&
11 (ret= memcached_connect(&mem->hosts[x])) != MEMCACHED_SUCCESS)11 (ret= memcached_connect(&memc->hosts[x])) != MEMCACHED_SUCCESS)
12 {12 {
13 WATCHPOINT_ERROR(ret);13 WATCHPOINT_ERROR(ret);
14 return ret;14 return ret;
15 }15 }
16 if (memcached_io_write(&mem->hosts[x], NULL, 0, 1) == -1)16 if (memcached_io_write(&memc->hosts[x], NULL, 0, 1) == -1)
17 ret= MEMCACHED_SOME_ERRORS;17 ret= MEMCACHED_SOME_ERRORS;
18 }18 }
1919
2020
=== modified file 'libmemcached/get.c'
--- libmemcached/get.c 2009-12-17 08:03:27 +0000
+++ libmemcached/get.c 2010-01-12 00:36:12 +0000
@@ -155,12 +155,11 @@
155 return MEMCACHED_NOT_SUPPORTED;155 return MEMCACHED_NOT_SUPPORTED;
156156
157 LIBMEMCACHED_MEMCACHED_MGET_START();157 LIBMEMCACHED_MEMCACHED_MGET_START();
158 ptr->cursor_server= 0;
159158
160 if (number_of_keys == 0)159 if (number_of_keys == 0)
161 return MEMCACHED_NOTFOUND;160 return MEMCACHED_NOTFOUND;
162161
163 if (ptr->number_of_hosts == 0)162 if (memcached_server_count(ptr) == 0)
164 return MEMCACHED_NO_SERVERS;163 return MEMCACHED_NO_SERVERS;
165164
166 if (ptr->flags.verify_key && (memcached_key_test(keys, key_length, number_of_keys) == MEMCACHED_BAD_KEY_PROVIDED))165 if (ptr->flags.verify_key && (memcached_key_test(keys, key_length, number_of_keys) == MEMCACHED_BAD_KEY_PROVIDED))
@@ -180,7 +179,7 @@
180179
181 It might be optimum to bounce the connection if count > some number.180 It might be optimum to bounce the connection if count > some number.
182 */181 */
183 for (x= 0; x < ptr->number_of_hosts; x++)182 for (x= 0; x < memcached_server_count(ptr); x++)
184 {183 {
185 if (memcached_server_response_count(&ptr->hosts[x]))184 if (memcached_server_response_count(&ptr->hosts[x]))
186 {185 {
@@ -263,7 +262,7 @@
263 /*262 /*
264 Should we muddle on if some servers are dead?263 Should we muddle on if some servers are dead?
265 */264 */
266 for (x= 0; x < ptr->number_of_hosts; x++)265 for (x= 0; x < memcached_server_count(ptr); x++)
267 {266 {
268 if (memcached_server_response_count(&ptr->hosts[x]))267 if (memcached_server_response_count(&ptr->hosts[x]))
269 {268 {
@@ -412,7 +411,7 @@
412 request.message.header.request.opcode= PROTOCOL_BINARY_CMD_NOOP;411 request.message.header.request.opcode= PROTOCOL_BINARY_CMD_NOOP;
413 request.message.header.request.datatype= PROTOCOL_BINARY_RAW_BYTES;412 request.message.header.request.datatype= PROTOCOL_BINARY_RAW_BYTES;
414413
415 for (x= 0; x < ptr->number_of_hosts; x++)414 for (x= 0; x < memcached_server_count(ptr); x++)
416 if (memcached_server_response_count(&ptr->hosts[x]))415 if (memcached_server_response_count(&ptr->hosts[x]))
417 {416 {
418 if (memcached_io_write(&ptr->hosts[x], NULL, 0, 1) == -1)417 if (memcached_io_write(&ptr->hosts[x], NULL, 0, 1) == -1)
@@ -457,7 +456,7 @@
457456
458 for (x= 0; x < number_of_keys; ++x)457 for (x= 0; x < number_of_keys; ++x)
459 {458 {
460 if (hash[x] == ptr->number_of_hosts)459 if (hash[x] == memcached_server_count(ptr))
461 continue; /* Already successfully sent */460 continue; /* Already successfully sent */
462461
463 uint32_t server= hash[x] + replica;462 uint32_t server= hash[x] + replica;
@@ -466,8 +465,8 @@
466 if (randomize_read && ((server + start) <= (hash[x] + ptr->number_of_replicas)))465 if (randomize_read && ((server + start) <= (hash[x] + ptr->number_of_replicas)))
467 server += start;466 server += start;
468467
469 while (server >= ptr->number_of_hosts)468 while (server >= memcached_server_count(ptr))
470 server -= ptr->number_of_hosts;469 server -= memcached_server_count(ptr);
471470
472 if (dead_servers[server])471 if (dead_servers[server])
473 continue;472 continue;
@@ -516,7 +515,7 @@
516 }515 }
517516
518 memcached_server_response_increment(&ptr->hosts[server]);517 memcached_server_response_increment(&ptr->hosts[server]);
519 hash[x]= ptr->number_of_hosts;518 hash[x]= memcached_server_count(ptr);
520 }519 }
521520
522 if (success)521 if (success)
@@ -547,7 +546,7 @@
547 bool* dead_servers;546 bool* dead_servers;
548547
549 hash= ptr->call_malloc(ptr, sizeof(uint32_t) * number_of_keys);548 hash= ptr->call_malloc(ptr, sizeof(uint32_t) * number_of_keys);
550 dead_servers= ptr->call_calloc(ptr, ptr->number_of_hosts, sizeof(bool));549 dead_servers= ptr->call_calloc(ptr, memcached_server_count(ptr), sizeof(bool));
551550
552 if (hash == NULL || dead_servers == NULL)551 if (hash == NULL || dead_servers == NULL)
553 {552 {
554553
=== modified file 'libmemcached/hash.c'
--- libmemcached/hash.c 2009-12-17 07:20:58 +0000
+++ libmemcached/hash.c 2010-01-12 00:36:12 +0000
@@ -111,9 +111,9 @@
111 uint32_t hash= 1; /* Just here to remove compile warning */111 uint32_t hash= 1; /* Just here to remove compile warning */
112112
113113
114 WATCHPOINT_ASSERT(ptr->number_of_hosts);114 WATCHPOINT_ASSERT(memcached_server_count(ptr));
115115
116 if (ptr->number_of_hosts == 1)116 if (memcached_server_count(ptr) == 1)
117 return 0;117 return 0;
118118
119 hash= memcached_generate_hash_value(key, key_length, ptr->hash);119 hash= memcached_generate_hash_value(key, key_length, ptr->hash);
@@ -150,13 +150,13 @@
150 return right->index;150 return right->index;
151 }151 }
152 case MEMCACHED_DISTRIBUTION_MODULA:152 case MEMCACHED_DISTRIBUTION_MODULA:
153 return hash % ptr->number_of_hosts;153 return hash % memcached_server_count(ptr);
154 case MEMCACHED_DISTRIBUTION_RANDOM:154 case MEMCACHED_DISTRIBUTION_RANDOM:
155 return (uint32_t) random() % ptr->number_of_hosts;155 return (uint32_t) random() % memcached_server_count(ptr);
156 case MEMCACHED_DISTRIBUTION_CONSISTENT_MAX:156 case MEMCACHED_DISTRIBUTION_CONSISTENT_MAX:
157 default:157 default:
158 WATCHPOINT_ASSERT(0); /* We have added a distribution without extending the logic */158 WATCHPOINT_ASSERT(0); /* We have added a distribution without extending the logic */
159 return hash % ptr->number_of_hosts;159 return hash % memcached_server_count(ptr);
160 }160 }
161 /* NOTREACHED */161 /* NOTREACHED */
162}162}
@@ -169,9 +169,9 @@
169{169{
170 uint32_t hash= 1; /* Just here to remove compile warning */170 uint32_t hash= 1; /* Just here to remove compile warning */
171171
172 WATCHPOINT_ASSERT(ptr->number_of_hosts);172 WATCHPOINT_ASSERT(memcached_server_count(ptr));
173173
174 if (ptr->number_of_hosts == 1)174 if (memcached_server_count(ptr) == 1)
175 return 0;175 return 0;
176176
177 if (ptr->flags.hash_with_prefix_key)177 if (ptr->flags.hash_with_prefix_key)
178178
=== modified file 'libmemcached/hosts.c'
--- libmemcached/hosts.c 2010-01-03 01:07:52 +0000
+++ libmemcached/hosts.c 2010-01-12 00:36:12 +0000
@@ -26,10 +26,10 @@
2626
27static void sort_hosts(memcached_st *ptr)27static void sort_hosts(memcached_st *ptr)
28{28{
29 if (ptr->number_of_hosts)29 if (memcached_server_count(ptr))
30 {30 {
31 qsort(ptr->hosts, ptr->number_of_hosts, sizeof(memcached_server_st), compare_servers);31 qsort(ptr->hosts, memcached_server_count(ptr), sizeof(memcached_server_st), compare_servers);
32 ptr->hosts[0].count= (uint16_t) ptr->number_of_hosts;32 ptr->hosts[0].number_of_hosts= memcached_server_count(ptr);
33 }33 }
34}34}
3535
@@ -60,26 +60,6 @@
60 return MEMCACHED_SUCCESS;60 return MEMCACHED_SUCCESS;
61}61}
6262
63void server_list_free(memcached_st *ptr, memcached_server_st *servers)
64{
65 unsigned int x;
66
67 if (servers == NULL)
68 return;
69
70 for (x= 0; x < servers->count; x++)
71 if (servers[x].address_info)
72 {
73 freeaddrinfo(servers[x].address_info);
74 servers[x].address_info= NULL;
75 }
76
77 if (ptr)
78 ptr->call_free(ptr, servers);
79 else
80 free(servers);
81}
82
83static uint32_t ketama_server_hash(const char *key, unsigned int key_length, int alignment)63static uint32_t ketama_server_hash(const char *key, unsigned int key_length, int alignment)
84{64{
85 unsigned char results[16];65 unsigned char results[16];
@@ -137,7 +117,7 @@
137 {117 {
138 live_servers= 0;118 live_servers= 0;
139 ptr->next_distribution_rebuild= 0;119 ptr->next_distribution_rebuild= 0;
140 for (host_index= 0; host_index < ptr->number_of_hosts; ++host_index)120 for (host_index= 0; host_index < memcached_server_count(ptr); ++host_index)
141 {121 {
142 if (list[host_index].next_retry <= now.tv_sec)122 if (list[host_index].next_retry <= now.tv_sec)
143 live_servers++;123 live_servers++;
@@ -149,7 +129,9 @@
149 }129 }
150 }130 }
151 else131 else
152 live_servers= ptr->number_of_hosts;132 {
133 live_servers= memcached_server_count(ptr);
134 }
153135
154 is_ketama_weighted= memcached_behavior_get(ptr, MEMCACHED_BEHAVIOR_KETAMA_WEIGHTED);136 is_ketama_weighted= memcached_behavior_get(ptr, MEMCACHED_BEHAVIOR_KETAMA_WEIGHTED);
155 points_per_server= (uint32_t) (is_ketama_weighted ? MEMCACHED_POINTS_PER_SERVER_KETAMA : MEMCACHED_POINTS_PER_SERVER);137 points_per_server= (uint32_t) (is_ketama_weighted ? MEMCACHED_POINTS_PER_SERVER_KETAMA : MEMCACHED_POINTS_PER_SERVER);
@@ -173,7 +155,7 @@
173155
174 if (is_ketama_weighted)156 if (is_ketama_weighted)
175 {157 {
176 for (host_index = 0; host_index < ptr->number_of_hosts; ++host_index)158 for (host_index = 0; host_index < memcached_server_count(ptr); ++host_index)
177 {159 {
178 if (list[host_index].weight == 0)160 if (list[host_index].weight == 0)
179 {161 {
@@ -184,7 +166,7 @@
184 }166 }
185 }167 }
186168
187 for (host_index = 0; host_index < ptr->number_of_hosts; ++host_index)169 for (host_index = 0; host_index < memcached_server_count(ptr); ++host_index)
188 {170 {
189 if (is_auto_ejecting && list[host_index].next_retry > now.tv_sec)171 if (is_auto_ejecting && list[host_index].next_retry > now.tv_sec)
190 continue;172 continue;
@@ -295,12 +277,12 @@
295277
296 WATCHPOINT_ASSERT(ptr);278 WATCHPOINT_ASSERT(ptr);
297 WATCHPOINT_ASSERT(ptr->continuum);279 WATCHPOINT_ASSERT(ptr->continuum);
298 WATCHPOINT_ASSERT(ptr->number_of_hosts * MEMCACHED_POINTS_PER_SERVER <= MEMCACHED_CONTINUUM_SIZE);280 WATCHPOINT_ASSERT(memcached_server_count(ptr) * MEMCACHED_POINTS_PER_SERVER <= MEMCACHED_CONTINUUM_SIZE);
299 ptr->continuum_points_counter= pointer_counter;281 ptr->continuum_points_counter= pointer_counter;
300 qsort(ptr->continuum, ptr->continuum_points_counter, sizeof(memcached_continuum_item_st), continuum_item_cmp);282 qsort(ptr->continuum, ptr->continuum_points_counter, sizeof(memcached_continuum_item_st), continuum_item_cmp);
301283
302#ifdef DEBUG284#ifdef DEBUG
303 for (pointer_index= 0; ptr->number_of_hosts && pointer_index < ((live_servers * MEMCACHED_POINTS_PER_SERVER) - 1); pointer_index++)285 for (pointer_index= 0; memcached_server_count(ptr) && pointer_index < ((live_servers * MEMCACHED_POINTS_PER_SERVER) - 1); pointer_index++)
304 {286 {
305 WATCHPOINT_ASSERT(ptr->continuum[pointer_index].value <= ptr->continuum[pointer_index + 1].value);287 WATCHPOINT_ASSERT(ptr->continuum[pointer_index].value <= ptr->continuum[pointer_index + 1].value);
306 }288 }
@@ -319,9 +301,9 @@
319 if (!list)301 if (!list)
320 return MEMCACHED_SUCCESS;302 return MEMCACHED_SUCCESS;
321303
322 count= list[0].count;304 count= memcached_servers_count(list);
323 new_host_list= ptr->call_realloc(ptr, ptr->hosts,305 new_host_list= ptr->call_realloc(ptr, ptr->hosts,
324 sizeof(memcached_server_st) * (count + ptr->number_of_hosts));306 sizeof(memcached_server_st) * (count + memcached_server_count(ptr)));
325307
326 if (! new_host_list)308 if (! new_host_list)
327 return MEMCACHED_MEMORY_ALLOCATION_FAILURE;309 return MEMCACHED_MEMORY_ALLOCATION_FAILURE;
@@ -336,13 +318,13 @@
336 return MEMCACHED_INVALID_HOST_PROTOCOL;318 return MEMCACHED_INVALID_HOST_PROTOCOL;
337319
338 WATCHPOINT_ASSERT(list[x].hostname[0] != 0);320 WATCHPOINT_ASSERT(list[x].hostname[0] != 0);
339 memcached_server_create(ptr, &ptr->hosts[ptr->number_of_hosts]);321 memcached_server_create(ptr, &ptr->hosts[memcached_server_count(ptr)]);
340 /* TODO check return type */322 /* TODO check return type */
341 (void)memcached_server_create_with(ptr, &ptr->hosts[ptr->number_of_hosts], list[x].hostname,323 (void)memcached_server_create_with(ptr, &ptr->hosts[memcached_server_count(ptr)], list[x].hostname,
342 list[x].port, list[x].weight, list[x].type);324 list[x].port, list[x].weight, list[x].type);
343 ptr->number_of_hosts++;325 ptr->number_of_hosts++;
344 }326 }
345 ptr->hosts[0].count= (uint16_t) ptr->number_of_hosts;327 ptr->hosts[0].number_of_hosts= memcached_server_count(ptr);
346328
347 return run_distribution(ptr);329 return run_distribution(ptr);
348}330}
@@ -417,7 +399,7 @@
417 return MEMCACHED_INVALID_HOST_PROTOCOL;399 return MEMCACHED_INVALID_HOST_PROTOCOL;
418400
419 new_host_list= ptr->call_realloc(ptr, ptr->hosts,401 new_host_list= ptr->call_realloc(ptr, ptr->hosts,
420 sizeof(memcached_server_st) * (ptr->number_of_hosts+1));402 sizeof(memcached_server_st) * (ptr->number_of_hosts + 1));
421403
422 if (new_host_list == NULL)404 if (new_host_list == NULL)
423 return MEMCACHED_MEMORY_ALLOCATION_FAILURE;405 return MEMCACHED_MEMORY_ALLOCATION_FAILURE;
@@ -425,9 +407,10 @@
425 ptr->hosts= new_host_list;407 ptr->hosts= new_host_list;
426408
427 /* TODO: Check return type */409 /* TODO: Check return type */
428 (void)memcached_server_create_with(ptr, &ptr->hosts[ptr->number_of_hosts], hostname, port, weight, type);410 (void)memcached_server_create_with(ptr, &ptr->hosts[memcached_server_count(ptr)], hostname, port, weight, type);
429 ptr->number_of_hosts++;411 ptr->number_of_hosts++;
430 ptr->hosts[0].count= (uint16_t) ptr->number_of_hosts;412
413 memcached_servers_set_count(&ptr->hosts[0], memcached_server_count(ptr));
431414
432 return run_distribution(ptr);415 return run_distribution(ptr);
433}416}
@@ -438,7 +421,7 @@
438 memcached_st *ptr= st_ptr->root;421 memcached_st *ptr= st_ptr->root;
439 memcached_server_st *list= ptr->hosts;422 memcached_server_st *list= ptr->hosts;
440423
441 for (x= 0, host_index= 0; x < ptr->number_of_hosts; x++)424 for (x= 0, host_index= 0; x < memcached_server_count(ptr); x++)
442 {425 {
443 if (strncmp(list[x].hostname, st_ptr->hostname, MEMCACHED_MAX_HOST_LENGTH) != 0 || list[x].port != st_ptr->port)426 if (strncmp(list[x].hostname, st_ptr->hostname, MEMCACHED_MAX_HOST_LENGTH) != 0 || list[x].port != st_ptr->port)
444 {427 {
@@ -484,7 +467,7 @@
484 count= 1;467 count= 1;
485 if (ptr != NULL)468 if (ptr != NULL)
486 {469 {
487 count+= ptr[0].count;470 count+= memcached_servers_count(ptr);
488 }471 }
489472
490 new_host_list= (memcached_server_st *)realloc(ptr, sizeof(memcached_server_st) * count);473 new_host_list= (memcached_server_st *)realloc(ptr, sizeof(memcached_server_st) * count);
@@ -498,21 +481,8 @@
498 memcached_server_create_with(NULL, &new_host_list[count-1], hostname, port, weight, MEMCACHED_CONNECTION_TCP);481 memcached_server_create_with(NULL, &new_host_list[count-1], hostname, port, weight, MEMCACHED_CONNECTION_TCP);
499482
500 /* Backwards compatibility hack */483 /* Backwards compatibility hack */
501 new_host_list[0].count= (uint16_t) count;484 memcached_servers_set_count(new_host_list, count);
502485
503 *error= MEMCACHED_SUCCESS;486 *error= MEMCACHED_SUCCESS;
504 return new_host_list;487 return new_host_list;
505}488}
506
507unsigned int memcached_server_list_count(memcached_server_st *ptr)
508{
509 if (ptr == NULL)
510 return 0;
511
512 return ptr[0].count;
513}
514
515void memcached_server_list_free(memcached_server_st *ptr)
516{
517 server_list_free(NULL, ptr);
518}
519489
=== modified file 'libmemcached/include.am'
--- libmemcached/include.am 2009-12-30 03:18:20 +0000
+++ libmemcached/include.am 2010-01-12 00:36:12 +0000
@@ -3,10 +3,9 @@
3# All paths should be given relative to the root3# All paths should be given relative to the root
44
5EXTRA_DIST+= \5EXTRA_DIST+= \
6 libmemcached/configure.h.in \
6 libmemcached/libmemcached_probes.d \7 libmemcached/libmemcached_probes.d \
7 libmemcached/memcached/README.txt \8 libmemcached/memcached/README.txt
8 libmemcached/memcached_configure.h.in
9
109
11noinst_HEADERS+= \10noinst_HEADERS+= \
12 libmemcached/byteorder.h \11 libmemcached/byteorder.h \
@@ -14,36 +13,34 @@
14 libmemcached/io.h \13 libmemcached/io.h \
15 libmemcached/internal.h \14 libmemcached/internal.h \
16 libmemcached/common.h \15 libmemcached/common.h \
17 libmemcached/memcached/protocol_binary.h \
18 libmemcached/protocol/common.h \16 libmemcached/protocol/common.h \
19 libmemcached/protocol/ascii_handler.h \17 libmemcached/protocol/ascii_handler.h \
20 libmemcached/protocol/binary_handler.h18 libmemcached/protocol/binary_handler.h
2119
22nobase_pkginclude_HEADERS+= \20nobase_include_HEADERS+= \
23 libmemcached/analyze.h \21 libmemcached/analyze.h \
24 libmemcached/auto.h \22 libmemcached/auto.h \
25 libmemcached/behavior.h \23 libmemcached/behavior.h \
26 libmemcached/callback.h \24 libmemcached/callback.h \
27 libmemcached/constants.h \25 libmemcached/configure.h \
28 libmemcached/dump.h \26 libmemcached/constants.h \
29 libmemcached/exception.hpp \27 libmemcached/dump.h \
30 libmemcached/get.h \28 libmemcached/exception.hpp \
31 libmemcached/memcached.h \29 libmemcached/get.h \
32 libmemcached/memcached.hpp \30 libmemcached/memcached.h \
33 libmemcached/memcached_configure.h \31 libmemcached/memcached.hpp \
34 libmemcached/protocol/cache.h \32 libmemcached/memcached/protocol_binary.h \
35 libmemcached/protocol/callback.h \33 libmemcached/protocol/cache.h \
36 libmemcached/protocol_handler.h \34 libmemcached/protocol/callback.h \
37 libmemcached/result.h \35 libmemcached/protocol_handler.h \
38 libmemcached/server.h \36 libmemcached/result.h \
39 libmemcached/stats.h \37 libmemcached/server.h \
40 libmemcached/storage.h \38 libmemcached/stats.h \
41 libmemcached/string.h \39 libmemcached/storage.h \
42 libmemcached/types.h \40 libmemcached/string.h \
43 libmemcached/visibility.h \41 libmemcached/types.h \
44 libmemcached/watchpoint.h42 libmemcached/visibility.h \
4543 libmemcached/watchpoint.h
46
4744
48lib_LTLIBRARIES+= libmemcached/libmemcachedprotocol.la45lib_LTLIBRARIES+= libmemcached/libmemcachedprotocol.la
49libmemcached_libmemcachedprotocol_la_SOURCES = \46libmemcached_libmemcachedprotocol_la_SOURCES = \
@@ -111,10 +108,12 @@
111108
112libmemcached_libmemcached_la_DEPENDENCIES= libmemcached/libmemcachedcallbacks.la libmemcached/libmemcachedinternal.la109libmemcached_libmemcached_la_DEPENDENCIES= libmemcached/libmemcachedcallbacks.la libmemcached/libmemcachedinternal.la
113libmemcached_libmemcached_la_LIBADD= $(LIBM) libmemcached/libmemcachedcallbacks.la libmemcached/libmemcachedinternal.la110libmemcached_libmemcached_la_LIBADD= $(LIBM) libmemcached/libmemcachedcallbacks.la libmemcached/libmemcachedinternal.la
114libmemcached_libmemcached_la_LDFLAGS= ${AM_LDFLAGS} -version-info 3:0:0111libmemcached_libmemcached_la_LDFLAGS= ${AM_LDFLAGS} -version-info ${MEMCACHED_LIBRARY_VERSION}
115112
116if BUILD_LIBMEMCACHEDUTIL113if BUILD_LIBMEMCACHEDUTIL
117pkginclude_HEADERS+= libmemcached/memcached_util.h libmemcached/util/pool.h114nobase_include_HEADERS+= \
115 libmemcached/memcached_util.h \
116 libmemcached/util/pool.h
118lib_LTLIBRARIES+= libmemcached/libmemcachedutil.la117lib_LTLIBRARIES+= libmemcached/libmemcachedutil.la
119endif118endif
120119
121120
=== modified file 'libmemcached/io.c'
--- libmemcached/io.c 2009-12-18 11:18:05 +0000
+++ libmemcached/io.c 2010-01-12 00:36:12 +0000
@@ -156,7 +156,7 @@
156156
157 return;157 return;
158158
159 for (x= 0; x < ptr->number_of_hosts; x++)159 for (x= 0; x < memcached_server_count(ptr); x++)
160 {160 {
161 if (memcached_server_response_count(ptr, x) &&161 if (memcached_server_response_count(ptr, x) &&
162 ptr->hosts[x].read_data_length < MEMCACHED_MAX_BUFFER )162 ptr->hosts[x].read_data_length < MEMCACHED_MAX_BUFFER )
@@ -361,7 +361,7 @@
361 unsigned int host_index= 0;361 unsigned int host_index= 0;
362362
363 for (unsigned int x= 0;363 for (unsigned int x= 0;
364 x< memc->number_of_hosts && host_index < MAX_SERVERS_TO_POLL;364 x< memcached_server_count(memc) && host_index < MAX_SERVERS_TO_POLL;
365 ++x)365 ++x)
366 {366 {
367 if (memc->hosts[x].read_buffer_length > 0) /* I have data in the buffer */367 if (memc->hosts[x].read_buffer_length > 0) /* I have data in the buffer */
@@ -379,7 +379,7 @@
379 if (host_index < 2)379 if (host_index < 2)
380 {380 {
381 /* We have 0 or 1 server with pending events.. */381 /* We have 0 or 1 server with pending events.. */
382 for (unsigned int x= 0; x< memc->number_of_hosts; ++x)382 for (unsigned int x= 0; x< memcached_server_count(memc); ++x)
383 if (memcached_server_response_count(&memc->hosts[x]) > 0)383 if (memcached_server_response_count(&memc->hosts[x]) > 0)
384 return &memc->hosts[x];384 return &memc->hosts[x];
385385
@@ -394,11 +394,17 @@
394 case 0:394 case 0:
395 break;395 break;
396 default:396 default:
397 for (unsigned int x= 0; x < host_index; ++x)397 for (size_t x= 0; x < host_index; ++x)
398 {
398 if (fds[x].revents & POLLIN)399 if (fds[x].revents & POLLIN)
399 for (unsigned int y= 0; y < memc->number_of_hosts; ++y)400 {
401 for (unsigned int y= 0; y < memcached_server_count(memc); ++y)
402 {
400 if (memc->hosts[y].fd == fds[x].fd)403 if (memc->hosts[y].fd == fds[x].fd)
401 return &memc->hosts[y];404 return &memc->hosts[y];
405 }
406 }
407 }
402 }408 }
403409
404 return NULL;410 return NULL;
405411
=== modified file 'libmemcached/memcached.c'
--- libmemcached/memcached.c 2009-12-18 02:37:31 +0000
+++ libmemcached/memcached.c 2010-01-12 00:36:12 +0000
@@ -44,6 +44,38 @@
44 return ptr;44 return ptr;
45}45}
4646
47void server_list_free(memcached_st *ptr, memcached_server_st *servers)
48{
49 uint32_t x;
50
51 if (servers == NULL)
52 return;
53
54 for (x= 0; x < memcached_servers_count(servers); x++)
55 if (servers[x].address_info)
56 {
57 freeaddrinfo(servers[x].address_info);
58 servers[x].address_info= NULL;
59 }
60
61 if (ptr)
62 {
63 ptr->call_free(ptr, servers);
64 }
65 else
66 free(servers);
67}
68
69void memcached_servers_reset(memcached_st *ptr)
70{
71 server_list_free(ptr, ptr->hosts);
72
73 ptr->hosts= NULL;
74 ptr->number_of_hosts= 0;
75 ptr->last_disconnected_server= NULL;
76 ptr->server_failure_limit= 0;
77}
78
47void memcached_free(memcached_st *ptr)79void memcached_free(memcached_st *ptr)
48{80{
49 /* If we have anything open, lets close it now */81 /* If we have anything open, lets close it now */
5082
=== modified file 'libmemcached/memcached.h'
--- libmemcached/memcached.h 2009-12-22 06:58:44 +0000
+++ libmemcached/memcached.h 2010-01-12 00:36:12 +0000
@@ -24,7 +24,7 @@
24#include <netinet/in.h>24#include <netinet/in.h>
2525
26#include <libmemcached/visibility.h>26#include <libmemcached/visibility.h>
27#include <libmemcached/memcached_configure.h>27#include <libmemcached/configure.h>
28#include <libmemcached/constants.h>28#include <libmemcached/constants.h>
29#include <libmemcached/types.h>29#include <libmemcached/types.h>
30#include <libmemcached/string.h>30#include <libmemcached/string.h>
@@ -52,7 +52,7 @@
52 } options;52 } options;
53 memcached_server_distribution_t distribution;53 memcached_server_distribution_t distribution;
54 memcached_hash_t hash;54 memcached_hash_t hash;
55 uint32_t continuum_points_counter;55 uint32_t continuum_points_counter; // Ketama
56 memcached_server_st *hosts;56 memcached_server_st *hosts;
57 memcached_server_st *last_disconnected_server;57 memcached_server_st *last_disconnected_server;
58 int32_t snd_timeout;58 int32_t snd_timeout;
@@ -62,7 +62,6 @@
62 uint32_t io_bytes_watermark;62 uint32_t io_bytes_watermark;
63 uint32_t io_key_prefetch;63 uint32_t io_key_prefetch;
64 uint32_t number_of_hosts;64 uint32_t number_of_hosts;
65 uint32_t cursor_server;
66 int cached_errno;65 int cached_errno;
67 struct {66 struct {
68 bool auto_eject_hosts:1;67 bool auto_eject_hosts:1;
@@ -84,16 +83,16 @@
84 int32_t poll_timeout;83 int32_t poll_timeout;
85 int32_t connect_timeout;84 int32_t connect_timeout;
86 int32_t retry_timeout;85 int32_t retry_timeout;
87 uint32_t continuum_count;86 uint32_t continuum_count; // Ketama
88 int send_size;87 int send_size;
89 int recv_size;88 int recv_size;
90 void *user_data;89 void *user_data;
91 time_t next_distribution_rebuild;90 time_t next_distribution_rebuild; // Ketama
92 size_t prefix_key_length;91 size_t prefix_key_length;
93 uint32_t number_of_replicas;92 uint32_t number_of_replicas;
94 memcached_hash_t distribution_hash;93 memcached_hash_t distribution_hash;
95 memcached_result_st result;94 memcached_result_st result;
96 memcached_continuum_item_st *continuum;95 memcached_continuum_item_st *continuum; // Ketama
97 memcached_clone_fn on_clone;96 memcached_clone_fn on_clone;
98 memcached_cleanup_fn on_cleanup;97 memcached_cleanup_fn on_cleanup;
99 memcached_free_fn call_free;98 memcached_free_fn call_free;
@@ -109,6 +108,9 @@
109LIBMEMCACHED_API108LIBMEMCACHED_API
110memcached_return_t memcached_version(memcached_st *ptr);109memcached_return_t memcached_version(memcached_st *ptr);
111110
111LIBMEMCACHED_API
112void memcached_servers_reset(memcached_st *ptr);
113
112/* Public API */114/* Public API */
113115
114LIBMEMCACHED_API116LIBMEMCACHED_API
115117
=== modified file 'libmemcached/memcached/protocol_binary.h'
--- libmemcached/memcached/protocol_binary.h 2009-10-05 21:00:48 +0000
+++ libmemcached/memcached/protocol_binary.h 2010-01-12 00:36:12 +0000
@@ -29,7 +29,7 @@
29 *29 *
30 * Copy: See Copyright for the status of this software.30 * Copy: See Copyright for the status of this software.
31 *31 *
32 * Author: Trond Norbye <trond.norbye@sun.com>32 * Author: Trond Norbye <trond.norbye@gmail.com>
33 */33 */
3434
35#ifndef PROTOCOL_BINARY_H35#ifndef PROTOCOL_BINARY_H
3636
=== modified file 'libmemcached/quit.c'
--- libmemcached/quit.c 2009-12-18 11:17:36 +0000
+++ libmemcached/quit.c 2010-01-12 00:36:12 +0000
@@ -72,12 +72,12 @@
72 unsigned int x;72 unsigned int x;
7373
74 if (ptr->hosts == NULL ||74 if (ptr->hosts == NULL ||
75 ptr->number_of_hosts == 0)75 memcached_server_count(ptr) == 0)
76 return;76 return;
7777
78 if (ptr->hosts && ptr->number_of_hosts)78 if (ptr->hosts && memcached_server_count(ptr))
79 {79 {
80 for (x= 0; x < ptr->number_of_hosts; x++)80 for (x= 0; x < memcached_server_count(ptr); x++)
81 memcached_quit_server(&ptr->hosts[x], 0);81 memcached_quit_server(&ptr->hosts[x], 0);
82 }82 }
83}83}
8484
=== modified file 'libmemcached/server.c'
--- libmemcached/server.c 2010-01-03 01:07:52 +0000
+++ libmemcached/server.c 2010-01-12 00:36:12 +0000
@@ -113,11 +113,11 @@
113 void *context,113 void *context,
114 uint32_t number_of_callbacks)114 uint32_t number_of_callbacks)
115{115{
116 unsigned int y;116 uint32_t y;
117117
118 for (y= 0; y < ptr->number_of_hosts; y++)118 for (y= 0; y < memcached_server_count(ptr); y++)
119 {119 {
120 unsigned int x;120 uint32_t x;
121121
122 for (x= 0; x < number_of_callbacks; x++)122 for (x= 0; x < number_of_callbacks; x++)
123 {123 {
@@ -142,7 +142,7 @@
142 unlikely (*error != MEMCACHED_SUCCESS)142 unlikely (*error != MEMCACHED_SUCCESS)
143 return NULL;143 return NULL;
144144
145 unlikely (ptr->number_of_hosts == 0)145 unlikely (memcached_server_count(ptr) == 0)
146 {146 {
147 *error= MEMCACHED_NO_SERVERS;147 *error= MEMCACHED_NO_SERVERS;
148 return NULL;148 return NULL;
@@ -162,10 +162,9 @@
162162
163const char *memcached_server_error(memcached_server_st *ptr)163const char *memcached_server_error(memcached_server_st *ptr)
164{164{
165 if (ptr)165 return ptr
166 return ptr->cached_server_error;166 ? ptr->cached_server_error
167 else167 : NULL;
168 return NULL;
169}168}
170169
171void memcached_server_error_reset(memcached_server_st *ptr)170void memcached_server_error_reset(memcached_server_st *ptr)
@@ -177,3 +176,15 @@
177{176{
178 return ptr->last_disconnected_server;177 return ptr->last_disconnected_server;
179}178}
179
180uint32_t memcached_server_list_count(memcached_server_st *ptr)
181{
182 return (ptr == NULL)
183 ? 0
184 : memcached_servers_count(ptr);
185}
186
187void memcached_server_list_free(memcached_server_st *ptr)
188{
189 server_list_free(NULL, ptr);
190}
180191
=== modified file 'libmemcached/server.h'
--- libmemcached/server.h 2010-01-03 01:07:52 +0000
+++ libmemcached/server.h 2010-01-12 00:36:12 +0000
@@ -21,7 +21,7 @@
21 bool is_allocated:1;21 bool is_allocated:1;
22 bool sockaddr_inited:1;22 bool sockaddr_inited:1;
23 } options;23 } options;
24 uint16_t count;24 uint32_t number_of_hosts;
25 uint32_t cursor_active;25 uint32_t cursor_active;
26 in_port_t port;26 in_port_t port;
27 int cached_errno;27 int cached_errno;
@@ -47,6 +47,16 @@
47 char hostname[MEMCACHED_MAX_HOST_LENGTH];47 char hostname[MEMCACHED_MAX_HOST_LENGTH];
48};48};
4949
50static inline uint32_t memcached_servers_count(memcached_server_st *servers)
51{
52 return servers->number_of_hosts;
53}
54
55static inline uint32_t memcached_servers_set_count(memcached_server_st *servers, uint32_t count)
56{
57 return servers->number_of_hosts= count;
58}
59
50#define memcached_server_count(A) (A)->number_of_hosts60#define memcached_server_count(A) (A)->number_of_hosts
51#define memcached_server_name(A,B) (B).hostname61#define memcached_server_name(A,B) (B).hostname
52#define memcached_server_port(A,B) (B).port62#define memcached_server_port(A,B) (B).port
5363
=== modified file 'libmemcached/stats.c'
--- libmemcached/stats.c 2010-01-03 01:58:40 +0000
+++ libmemcached/stats.c 2010-01-12 00:36:12 +0000
@@ -369,7 +369,7 @@
369 return NULL;369 return NULL;
370 }370 }
371371
372 stats= ptr->call_calloc(ptr, ptr->number_of_hosts, sizeof(memcached_stat_st));372 stats= ptr->call_calloc(ptr, memcached_server_count(ptr), sizeof(memcached_stat_st));
373373
374 stats->root= ptr;374 stats->root= ptr;
375375
@@ -380,7 +380,7 @@
380 }380 }
381381
382 rc= MEMCACHED_SUCCESS;382 rc= MEMCACHED_SUCCESS;
383 for (x= 0; x < ptr->number_of_hosts; x++)383 for (x= 0; x < memcached_server_count(ptr); x++)
384 {384 {
385 memcached_return_t temp_return;385 memcached_return_t temp_return;
386386
387387
=== modified file 'libmemcached/storage.c'
--- libmemcached/storage.c 2009-12-18 18:46:19 +0000
+++ libmemcached/storage.c 2010-01-12 00:36:12 +0000
@@ -77,7 +77,7 @@
77 unlikely (rc != MEMCACHED_SUCCESS)77 unlikely (rc != MEMCACHED_SUCCESS)
78 return rc;78 return rc;
7979
80 unlikely (ptr->number_of_hosts == 0)80 unlikely (memcached_server_count(ptr) == 0)
81 return MEMCACHED_NO_SERVERS;81 return MEMCACHED_NO_SERVERS;
8282
83 if (ptr->flags.verify_key && (memcached_key_test((const char **)&key, &key_length, 1) == MEMCACHED_BAD_KEY_PROVIDED))83 if (ptr->flags.verify_key && (memcached_key_test((const char **)&key, &key_length, 1) == MEMCACHED_BAD_KEY_PROVIDED))
@@ -493,7 +493,7 @@
493 for (uint32_t x= 0; x < ptr->number_of_replicas; x++)493 for (uint32_t x= 0; x < ptr->number_of_replicas; x++)
494 {494 {
495 ++server_key;495 ++server_key;
496 if (server_key == ptr->number_of_hosts)496 if (server_key == memcached_server_count(ptr))
497 server_key= 0;497 server_key= 0;
498498
499 memcached_server_st *srv= &ptr->hosts[server_key];499 memcached_server_st *srv= &ptr->hosts[server_key];
500500
=== modified file 'libmemcached/verbosity.c'
--- libmemcached/verbosity.c 2009-12-16 23:01:10 +0000
+++ libmemcached/verbosity.c 2010-01-12 00:36:12 +0000
@@ -13,7 +13,7 @@
13 return MEMCACHED_WRITE_FAILURE;13 return MEMCACHED_WRITE_FAILURE;
1414
15 rc= MEMCACHED_SUCCESS;15 rc= MEMCACHED_SUCCESS;
16 for (x= 0; x < ptr->number_of_hosts; x++)16 for (x= 0; x < memcached_server_count(ptr); x++)
17 {17 {
18 memcached_return_t rrc;18 memcached_return_t rrc;
1919
2020
=== modified file 'libmemcached/version.c'
--- libmemcached/version.c 2009-12-16 23:01:10 +0000
+++ libmemcached/version.c 2010-01-12 00:36:12 +0000
@@ -31,7 +31,7 @@
31 send_length= strlen(command);31 send_length= strlen(command);
3232
33 rc= MEMCACHED_SUCCESS;33 rc= MEMCACHED_SUCCESS;
34 for (x= 0; x < ptr->number_of_hosts; x++)34 for (x= 0; x < memcached_server_count(ptr); x++)
35 {35 {
36 memcached_return_t rrc;36 memcached_return_t rrc;
3737
@@ -75,7 +75,7 @@
75 request.message.header.request.datatype= PROTOCOL_BINARY_RAW_BYTES;75 request.message.header.request.datatype= PROTOCOL_BINARY_RAW_BYTES;
7676
77 rc= MEMCACHED_SUCCESS;77 rc= MEMCACHED_SUCCESS;
78 for (x= 0; x < ptr->number_of_hosts; x++) 78 for (x= 0; x < memcached_server_count(ptr); x++)
79 {79 {
80 memcached_return_t rrc;80 memcached_return_t rrc;
8181
@@ -88,7 +88,8 @@
88 }88 }
89 }89 }
9090
91 for (x= 0; x < ptr->number_of_hosts; x++) 91 for (x= 0; x < memcached_server_count(ptr); x++)
92 {
92 if (memcached_server_response_count(&ptr->hosts[x]) > 0) 93 if (memcached_server_response_count(&ptr->hosts[x]) > 0)
93 {94 {
94 memcached_return_t rrc;95 memcached_return_t rrc;
@@ -107,6 +108,7 @@
107 ptr->hosts[x].minor_version= (uint8_t)strtol(p + 1, &p, 10);108 ptr->hosts[x].minor_version= (uint8_t)strtol(p + 1, &p, 10);
108 ptr->hosts[x].micro_version= (uint8_t)strtol(p + 1, NULL, 10);109 ptr->hosts[x].micro_version= (uint8_t)strtol(p + 1, NULL, 10);
109 }110 }
111 }
110112
111 return rc;113 return rc;
112}114}
113115
=== modified file 'm4/pandora_canonical.m4'
--- m4/pandora_canonical.m4 2010-01-02 05:10:47 +0000
+++ m4/pandora_canonical.m4 2010-01-12 00:36:12 +0000
@@ -4,7 +4,7 @@
4dnl with or without modifications, as long as this notice is preserved.4dnl with or without modifications, as long as this notice is preserved.
55
6dnl Which version of the canonical setup we're using6dnl Which version of the canonical setup we're using
7AC_DEFUN([PANDORA_CANONICAL_VERSION],[0.92])7AC_DEFUN([PANDORA_CANONICAL_VERSION],[0.94])
88
9AC_DEFUN([PANDORA_FORCE_DEPEND_TRACKING],[9AC_DEFUN([PANDORA_FORCE_DEPEND_TRACKING],[
10 AC_ARG_ENABLE([fat-binaries],10 AC_ARG_ENABLE([fat-binaries],
1111
=== modified file 'm4/pandora_have_libmemcached.m4'
--- m4/pandora_have_libmemcached.m4 2009-12-02 02:57:53 +0000
+++ m4/pandora_have_libmemcached.m4 2010-01-12 00:36:12 +0000
@@ -24,10 +24,28 @@
24 memcached_dump_func *df;24 memcached_dump_func *df;
25 memcached_lib_version();25 memcached_lib_version();
26 ])26 ])
27 AC_LIB_HAVE_LINKFLAGS(memcachedprotocol,,[
28 #include <libmemcached/protocol_handler.h>
29 ],[
30 struct memcached_protocol_st *protocol_handle;
31 protocol_handle= memcached_protocol_create_instance();
32 ])
27 ],[33 ],[
28 ac_cv_libmemcached="no"34 ac_cv_libmemcached="no"
29 ])35 ])
30 36
37 AC_CACHE_CHECK([if libmemcached has memcached_server_fn],
38 [pandora_cv_libmemcached_server_fn],
39 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
40#include <libmemcached/memcached.h>
41memcached_server_fn callbacks[1];
42 ]])],
43 [pandora_cv_libmemcached_server_fn=yes],
44 [pandora_cv_libmemcached_server_fn=no])])
45 AS_IF([test "x$pandora_cv_libmemcached_server_fn" = "xyes"],[
46 AC_DEFINE([HAVE_MEMCACHED_SERVER_FN],[1],[If we have the new memcached_server_fn typedef])
47 ])
48
31 AM_CONDITIONAL(HAVE_LIBMEMCACHED, [test "x${ac_cv_libmemcached}" = "xyes"])49 AM_CONDITIONAL(HAVE_LIBMEMCACHED, [test "x${ac_cv_libmemcached}" = "xyes"])
32 50
33])51])
@@ -41,3 +59,4 @@
41 AS_IF([test x$ac_cv_libmemcached = xno],59 AS_IF([test x$ac_cv_libmemcached = xno],
42 AC_MSG_ERROR([libmemcached is required for ${PACKAGE}]))60 AC_MSG_ERROR([libmemcached is required for ${PACKAGE}]))
43])61])
62
4463
=== modified file 'support/libmemcached.spec.in'
--- support/libmemcached.spec.in 2009-12-17 17:28:30 +0000
+++ support/libmemcached.spec.in 2010-01-12 00:36:12 +0000
@@ -4,7 +4,7 @@
4Release: 14Release: 1
5License: BSD5License: BSD
6Group: System Environment/Libraries6Group: System Environment/Libraries
7URL: http://tangent.org/552/libmemcached.html7URL: http://launchpad.net/libmemcached
8Source0: http://download.tangent.org/libmemcached-%{version}.tar.gz8Source0: http://download.tangent.org/libmemcached-%{version}.tar.gz
99
10# For test suite10# For test suite
@@ -78,32 +78,65 @@
78%defattr (-,root,root,-) 78%defattr (-,root,root,-)
79%doc AUTHORS COPYING NEWS README THANKS TODO79%doc AUTHORS COPYING NEWS README THANKS TODO
80%{_bindir}/mem*80%{_bindir}/mem*
81%exclude %{_libdir}/libmemcached.a
82%exclude %{_libdir}/libmemcached.la81%exclude %{_libdir}/libmemcached.la
83%exclude %{_libdir}/libmemcachedutil.a82%exclude %{_libdir}/libhashkit.la
84%exclude %{_libdir}/libmemcachedprotocol.a
85%exclude %{_libdir}/libmemcachedutil.la83%exclude %{_libdir}/libmemcachedutil.la
86%exclude %{_libdir}/libmemcachedprotocol.la84%exclude %{_libdir}/libmemcachedprotocol.la
85%{_libdir}/libhashkit.so.*
87%{_libdir}/libmemcached.so.*86%{_libdir}/libmemcached.so.*
88%{_libdir}/libmemcachedutil.so.*87%{_libdir}/libmemcachedutil.so.*
89%{_libdir}/libmemcachedprotocol.so.*88%{_libdir}/libmemcachedprotocol.so.*
90%{_mandir}/man1/mem*89%{_mandir}/man1/mem*
91%exclude libhashkit/*
9290
9391
94%files devel92%files devel
95%defattr (-,root,root,-) 93%defattr (-,root,root,-)
96%doc examples94%doc examples
97%{_includedir}/libmemcached95%{_includedir}/libhashkit/algorithm.h
96%{_includedir}/libhashkit/behavior.h
97%{_includedir}/libhashkit/hashkit.h
98%{_includedir}/libhashkit/strerror.h
99%{_includedir}/libhashkit/types.h
100%{_includedir}/libhashkit/visibility.h
101%{_includedir}/libmemcached/analyze.h
102%{_includedir}/libmemcached/auto.h
103%{_includedir}/libmemcached/behavior.h
104%{_includedir}/libmemcached/callback.h
105%{_includedir}/libmemcached/configure.h
106%{_includedir}/libmemcached/constants.h
107%{_includedir}/libmemcached/dump.h
108%{_includedir}/libmemcached/exception.hpp
109%{_includedir}/libmemcached/get.h
110%{_includedir}/libmemcached/memcached.h
111%{_includedir}/libmemcached/memcached.hpp
112%{_includedir}/libmemcached/memcached_util.h
113%{_includedir}/libmemcached/protocol
114%{_includedir}/libmemcached/protocol/cache.h
115%{_includedir}/libmemcached/protocol/callback.h
116%{_includedir}/libmemcached/protocol_handler.h
117%{_includedir}/libmemcached/result.h
118%{_includedir}/libmemcached/server.h
119%{_includedir}/libmemcached/stats.h
120%{_includedir}/libmemcached/storage.h
121%{_includedir}/libmemcached/string.h
122%{_includedir}/libmemcached/types.h
123%{_includedir}/libmemcached/util/pool.h
124%{_includedir}/libmemcached/visibility.h
125%{_includedir}/libmemcached/watchpoint.h
126%{_libdir}/libhashkit.so
98%{_libdir}/libmemcached.so127%{_libdir}/libmemcached.so
128%{_libdir}/libmemcachedprotocol.so
99%{_libdir}/libmemcachedutil.so129%{_libdir}/libmemcachedutil.so
100%{_libdir}/libmemcachedprotocol.so
101%{_libdir}/pkgconfig/libmemcached.pc130%{_libdir}/pkgconfig/libmemcached.pc
131%{_mandir}/man3/hashkit*.3.gz
102%{_mandir}/man3/libmemcached*.3.gz132%{_mandir}/man3/libmemcached*.3.gz
103%{_mandir}/man3/memcached_*.3.gz133%{_mandir}/man3/memcached_*.3.gz
104134
105135
106%changelog136%changelog
137* Fri Jan 8 2010 Brian Aker <brian@tangent.org> - 0.37-1
138- Modified to be explicit in install include files.
139
107* Sat Apr 25 2009 Remi Collet <rpms@famillecollet.com> - 0.28-1140* Sat Apr 25 2009 Remi Collet <rpms@famillecollet.com> - 0.28-1
108- Initial RPM from Brian Aker spec141- Initial RPM from Brian Aker spec
109- create -devel subpackage142- create -devel subpackage
110143
=== modified file 'tests/function.c'
--- tests/function.c 2009-12-18 22:23:40 +0000
+++ tests/function.c 2010-01-12 00:36:12 +0000
@@ -108,8 +108,8 @@
108 {108 {
109 test_ports[x]= (uint32_t)random() % 64000;109 test_ports[x]= (uint32_t)random() % 64000;
110 rc= memcached_server_add_with_weight(local_memc, "localhost", test_ports[x], 0);110 rc= memcached_server_add_with_weight(local_memc, "localhost", test_ports[x], 0);
111 test_truth(local_memc->number_of_hosts == x + 1);111 test_truth(memcached_server_count(local_memc) == x + 1);
112 test_truth(local_memc->hosts[0].count == x+1);112 test_truth(memcached_servers_count(local_memc->hosts) == x+1);
113 test_truth(rc == MEMCACHED_SUCCESS);113 test_truth(rc == MEMCACHED_SUCCESS);
114 }114 }
115115
@@ -179,8 +179,8 @@
179 {179 {
180 test_ports[x]= (uint32_t)(random() % 64000);180 test_ports[x]= (uint32_t)(random() % 64000);
181 rc= memcached_server_add_with_weight(local_memc, "localhost", test_ports[x], 0);181 rc= memcached_server_add_with_weight(local_memc, "localhost", test_ports[x], 0);
182 test_truth(local_memc->number_of_hosts == x+1);182 test_truth(memcached_server_count(local_memc) == x+1);
183 test_truth(local_memc->hosts[0].count == x+1);183 test_truth(memcached_servers_count(local_memc->hosts) == x+1);
184 test_truth(rc == MEMCACHED_SUCCESS);184 test_truth(rc == MEMCACHED_SUCCESS);
185 }185 }
186186
@@ -2030,11 +2030,7 @@
2030 size_t return_value_length;2030 size_t return_value_length;
20312031
2032 /* Here we free everything before running a bunch of mget tests */2032 /* Here we free everything before running a bunch of mget tests */
2033 {2033 memcached_servers_reset(memc);
2034 memcached_server_list_free(memc->hosts);
2035 memc->hosts= NULL;
2036 memc->number_of_hosts= 0;
2037 }
20382034
20392035
2040 /* We need to empty the server before continueing test */2036 /* We need to empty the server before continueing test */
@@ -2715,7 +2711,7 @@
2715 memcached_server_push(memc, server_pool);2711 memcached_server_push(memc, server_pool);
27162712
2717 /* verify that the server list was parsed okay. */2713 /* verify that the server list was parsed okay. */
2718 test_truth(memc->number_of_hosts == 8);2714 test_truth(memcached_server_count(memc) == 8);
2719 test_truth(strcmp(server_pool[0].hostname, "10.0.1.1") == 0);2715 test_truth(strcmp(server_pool[0].hostname, "10.0.1.1") == 0);
2720 test_truth(server_pool[0].port == 11211);2716 test_truth(server_pool[0].port == 11211);
2721 test_truth(server_pool[0].weight == 600);2717 test_truth(server_pool[0].weight == 600);
@@ -2866,7 +2862,7 @@
2866 memcached_server_push(memc, server_pool);2862 memcached_server_push(memc, server_pool);
28672863
2868 /* verify that the server list was parsed okay. */2864 /* verify that the server list was parsed okay. */
2869 test_truth(memc->number_of_hosts == 8);2865 test_truth(memcached_server_count(memc) == 8);
2870 test_truth(strcmp(server_pool[0].hostname, "10.0.1.1") == 0);2866 test_truth(strcmp(server_pool[0].hostname, "10.0.1.1") == 0);
2871 test_truth(server_pool[0].port == 11211);2867 test_truth(server_pool[0].port == 11211);
2872 test_truth(server_pool[0].weight == 600);2868 test_truth(server_pool[0].weight == 600);
@@ -3536,9 +3532,9 @@
3536 */3532 */
3537 memcached_return_t rc;3533 memcached_return_t rc;
3538 rc= memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS,3534 rc= memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS,
3539 memc->number_of_hosts - 1);3535 memcached_server_count(memc) - 1);
3540 test_truth(rc == MEMCACHED_SUCCESS);3536 test_truth(rc == MEMCACHED_SUCCESS);
3541 test_truth(memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS) == memc->number_of_hosts - 1);3537 test_truth(memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS) == memcached_server_count(memc) - 1);
35423538
3543 return rc == MEMCACHED_SUCCESS ? TEST_SUCCESS : TEST_SKIPPED;3539 return rc == MEMCACHED_SUCCESS ? TEST_SUCCESS : TEST_SKIPPED;
3544}3540}
@@ -3843,9 +3839,7 @@
3843 memcached_return_t rc;3839 memcached_return_t rc;
3844 struct stat buf;3840 struct stat buf;
38453841
3846 memcached_server_list_free(memc->hosts);3842 memcached_servers_reset(memc);
3847 memc->hosts= NULL;
3848 memc->number_of_hosts= 0;
38493843
3850 if (stat("/tmp/memcached.socket", &buf))3844 if (stat("/tmp/memcached.socket", &buf))
3851 return TEST_SKIPPED;3845 return TEST_SKIPPED;
@@ -3935,7 +3929,7 @@
3935 ** way it is supposed to do!!!!3929 ** way it is supposed to do!!!!
3936 */3930 */
3937 int no_msg=0;3931 int no_msg=0;
3938 for (uint32_t x=0; x < memc->number_of_hosts; ++x)3932 for (uint32_t x=0; x < memcached_server_count(memc); ++x)
3939 no_msg+=(int)(memc->hosts[x].cursor_active);3933 no_msg+=(int)(memc->hosts[x].cursor_active);
39403934
3941 test_truth(no_msg == 0);3935 test_truth(no_msg == 0);
@@ -4212,7 +4206,7 @@
4212 * within the library, and this is not a supported interface.4206 * within the library, and this is not a supported interface.
4213 * This is to verify correct behavior in the library4207 * This is to verify correct behavior in the library
4214 */4208 */
4215 for (uint32_t host= 0; host < memc->number_of_hosts; ++host)4209 for (uint32_t host= 0; host < memcached_server_count(memc); ++host)
4216 {4210 {
4217 memcached_st *memc_clone= memcached_clone(NULL, memc);4211 memcached_st *memc_clone= memcached_clone(NULL, memc);
4218 memc_clone->hosts[host].port= 0;4212 memc_clone->hosts[host].port= 0;
@@ -4410,11 +4404,11 @@
44104404
4411static uint16_t *get_udp_request_ids(memcached_st *memc)4405static uint16_t *get_udp_request_ids(memcached_st *memc)
4412{4406{
4413 uint16_t *ids= malloc(sizeof(uint16_t) * memc->number_of_hosts);4407 uint16_t *ids= malloc(sizeof(uint16_t) * memcached_server_count(memc));
4414 assert(ids != NULL);4408 assert(ids != NULL);
4415 unsigned int x;4409 unsigned int x;
44164410
4417 for (x= 0; x < memc->number_of_hosts; x++)4411 for (x= 0; x < memcached_server_count(memc); x++)
4418 ids[x]= get_udp_datagram_request_id((struct udp_datagram_header_st *) memc->hosts[x].write_buffer);4412 ids[x]= get_udp_datagram_request_id((struct udp_datagram_header_st *) memc->hosts[x].write_buffer);
44194413
4420 return ids;4414 return ids;
@@ -4426,7 +4420,7 @@
4426 memcached_server_st *cur_server = memc->hosts;4420 memcached_server_st *cur_server = memc->hosts;
4427 uint16_t *cur_req_ids = get_udp_request_ids(memc);4421 uint16_t *cur_req_ids = get_udp_request_ids(memc);
44284422
4429 for (x= 0; x < memc->number_of_hosts; x++)4423 for (x= 0; x < memcached_server_count(memc); x++)
4430 {4424 {
4431 test_truth(cur_server[x].cursor_active == 0);4425 test_truth(cur_server[x].cursor_active == 0);
4432 test_truth(cur_req_ids[x] == expected_req_ids[x]);4426 test_truth(cur_req_ids[x] == expected_req_ids[x]);
@@ -4449,7 +4443,7 @@
4449 || memc->hosts[0].micro_version < 6)4443 || memc->hosts[0].micro_version < 6)
4450 return TEST_SKIPPED;4444 return TEST_SKIPPED;
44514445
4452 uint32_t num_hosts= memc->number_of_hosts;4446 uint32_t num_hosts= memcached_server_count(memc);
4453 unsigned int x= 0;4447 unsigned int x= 0;
4454 memcached_server_st servers[num_hosts];4448 memcached_server_st servers[num_hosts];
4455 memcpy(servers, memc->hosts, sizeof(memcached_server_st) * num_hosts);4449 memcpy(servers, memc->hosts, sizeof(memcached_server_st) * num_hosts);
@@ -4512,7 +4506,7 @@
4512 test_truth(memc->flags.use_udp);4506 test_truth(memc->flags.use_udp);
4513 test_truth(memc->flags.no_reply);4507 test_truth(memc->flags.no_reply);
45144508
4515 test_truth(memc->number_of_hosts == 0);4509 test_truth(memcached_server_count(memc) == 0);
45164510
4517 memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_USE_UDP,0);4511 memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_USE_UDP,0);
4518 test_truth(! (memc->flags.use_udp));4512 test_truth(! (memc->flags.use_udp));
@@ -4619,7 +4613,7 @@
4619 memcached_return_t rc;4613 memcached_return_t rc;
4620 uint16_t *expected_ids= get_udp_request_ids(memc);4614 uint16_t *expected_ids= get_udp_request_ids(memc);
4621 unsigned int x;4615 unsigned int x;
4622 for (x= 0; x < memc->number_of_hosts;x++)4616 for (x= 0; x < memcached_server_count(memc); x++)
4623 increment_request_id(&expected_ids[x]);4617 increment_request_id(&expected_ids[x]);
46244618
4625 rc= memcached_verbosity(memc,3);4619 rc= memcached_verbosity(memc,3);
@@ -4639,7 +4633,7 @@
4639 memcached_return_t rc;4633 memcached_return_t rc;
4640 uint16_t *expected_ids= get_udp_request_ids(memc);4634 uint16_t *expected_ids= get_udp_request_ids(memc);
4641 unsigned int x;4635 unsigned int x;
4642 for (x= 0; x < memc->number_of_hosts;x++)4636 for (x= 0; x < memcached_server_count(memc);x++)
4643 increment_request_id(&expected_ids[x]);4637 increment_request_id(&expected_ids[x]);
46444638
4645 rc= memcached_flush(memc,0);4639 rc= memcached_flush(memc,0);
@@ -4964,7 +4958,7 @@
4964 memcached_server_push(memc, server_pool);4958 memcached_server_push(memc, server_pool);
49654959
4966 /* verify that the server list was parsed okay. */4960 /* verify that the server list was parsed okay. */
4967 test_truth(memc->number_of_hosts == 8);4961 test_truth(memcached_server_count(memc) == 8);
4968 test_strcmp(server_pool[0].hostname, "10.0.1.1");4962 test_strcmp(server_pool[0].hostname, "10.0.1.1");
4969 test_truth(server_pool[0].port == 11211);4963 test_truth(server_pool[0].port == 11211);
4970 test_truth(server_pool[0].weight == 600);4964 test_truth(server_pool[0].weight == 600);
@@ -5021,7 +5015,7 @@
5021 memcached_server_push(memc, server_pool);5015 memcached_server_push(memc, server_pool);
50225016
5023 /* verify that the server list was parsed okay. */5017 /* verify that the server list was parsed okay. */
5024 test_truth(memc->number_of_hosts == 8);5018 test_truth(memcached_server_count(memc) == 8);
5025 test_strcmp(server_pool[0].hostname, "10.0.1.1");5019 test_strcmp(server_pool[0].hostname, "10.0.1.1");
5026 test_truth(server_pool[0].port == 11211);5020 test_truth(server_pool[0].port == 11211);
5027 test_truth(server_pool[0].weight == 600);5021 test_truth(server_pool[0].weight == 600);
@@ -5094,7 +5088,7 @@
5094 * 1024 (that should satisfy most users don't you think?). Future versions5088 * 1024 (that should satisfy most users don't you think?). Future versions
5095 * will include a mget_execute function call if you need a higher number.5089 * will include a mget_execute function call if you need a higher number.
5096 */5090 */
5097 uint32_t number_of_hosts= memc->number_of_hosts;5091 uint32_t number_of_hosts= memcached_server_count(memc);
5098 memc->number_of_hosts= 1;5092 memc->number_of_hosts= 1;
5099 const size_t max_keys= 1024;5093 const size_t max_keys= 1024;
5100 char **keys= calloc(max_keys, sizeof(char*));5094 char **keys= calloc(max_keys, sizeof(char*));
@@ -5143,6 +5137,7 @@
5143 free(key_length);5137 free(key_length);
51445138
5145 memc->number_of_hosts= number_of_hosts;5139 memc->number_of_hosts= number_of_hosts;
5140
5146 return TEST_SUCCESS;5141 return TEST_SUCCESS;
5147}5142}
51485143
@@ -5204,7 +5199,7 @@
5204 test_truth(rc == MEMCACHED_SUCCESS);5199 test_truth(rc == MEMCACHED_SUCCESS);
5205 memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_TCP_NODELAY, 1);5200 memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_TCP_NODELAY, 1);
52065201
5207 uint32_t number_of_hosts= memc->number_of_hosts;5202 uint32_t number_of_hosts= memcached_server_count(memc);
5208 memc->number_of_hosts= 1;5203 memc->number_of_hosts= 1;
52095204
5210 char k[250];5205 char k[250];
@@ -5233,7 +5228,7 @@
52335228
5234static test_return_t regression_bug_447342(memcached_st *memc)5229static test_return_t regression_bug_447342(memcached_st *memc)
5235{5230{
5236 if (memc->number_of_hosts < 3 || pre_replication(memc) != MEMCACHED_SUCCESS)5231 if (memcached_server_count(memc) < 3 || pre_replication(memc) != MEMCACHED_SUCCESS)
5237 return TEST_SKIPPED;5232 return TEST_SKIPPED;
52385233
5239 memcached_return_t rc;5234 memcached_return_t rc;
@@ -5469,7 +5464,7 @@
5469 * in a non-portable way and you shouldn't be doing this. I'm only5464 * in a non-portable way and you shouldn't be doing this. I'm only
5470 * doing this in order to verify that the library works the way it should5465 * doing this in order to verify that the library works the way it should
5471 */5466 */
5472 uint32_t number_of_hosts= memc->number_of_hosts;5467 uint32_t number_of_hosts= memcached_server_count(memc);
5473 memc->number_of_hosts= 1;5468 memc->number_of_hosts= 1;
54745469
5475 /* Ensure that we are connected to the server by setting a value */5470 /* Ensure that we are connected to the server by setting a value */

Subscribers

People subscribed via source and target branches

to all changes: