summaryrefslogtreecommitdiff
path: root/memcache
Commit message (Collapse)AuthorAgeFilesLines
* Un-'fix' r585381; give the const'ness to include/apr_memcache.hwrowe2007-10-221-21/+21
| | | | | | | | | | | | | | to restore it in the various functions that desire it (pedantic compilers are picky about declaration/implementation mismatches, although this is absurd considering it's byval. Perhaps this helps in some optimization cases?) Also consistently refer to lengths in apr_size_t, and the number of pollset elts as apr_int32_t, to mirror apr_pollset interfaces. This was noted by bnicholes. git-svn-id: http://svn.apache.org/repos/asf/apr/apr-util/trunk@587284 13f79535-47bb-0310-9956-ffa450edef68
* Multiple type consistency violations.wrowe2007-10-171-7/+7
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr-util/trunk@585381 13f79535-47bb-0310-9956-ffa450edef68
* A declare macro has a scope of ONE LIBRARY ONLY.wrowe2007-10-171-22/+22
| | | | | | | And this ain't the one. git-svn-id: http://svn.apache.org/repos/asf/apr/apr-util/trunk@585373 13f79535-47bb-0310-9956-ffa450edef68
* Spell length correctly in the code. Check for it in another place.pquerna2007-09-201-3/+5
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr-util/trunk@577947 13f79535-47bb-0310-9956-ffa450edef68
* Small style cleanups, no functional changes.pquerna2007-09-201-6/+8
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr-util/trunk@577944 13f79535-47bb-0310-9956-ffa450edef68
* Only set len if length isn't null.pquerna2007-09-201-2/+4
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr-util/trunk@577943 13f79535-47bb-0310-9956-ffa450edef68
* While extremely unlikely, its possible that a key hash could be zero. ↵pquerna2007-06-081-1/+1
| | | | | | Maintain the behavoir of other clients, and set the hash to 1. git-svn-id: http://svn.apache.org/repos/asf/apr/apr-util/trunk@545432 13f79535-47bb-0310-9956-ffa450edef68
* Make the server selection pluggable. This should be all that is needed to ↵pquerna2007-06-081-0/+14
| | | | | | plug in one of the newer consistent hashing libraries, like libketama. git-svn-id: http://svn.apache.org/repos/asf/apr/apr-util/trunk@545431 13f79535-47bb-0310-9956-ffa450edef68
* Allow apr_memcache to use a pure CRC32 hash fucntion for server selection. ↵pquerna2007-06-081-2/+12
| | | | | | | | | We maintain the _default version, since it is identical to what the Perl memcache Client uses. Fixes PR: 39604 git-svn-id: http://svn.apache.org/repos/asf/apr/apr-util/trunk@545428 13f79535-47bb-0310-9956-ffa450edef68
* Init the hash function and baton to NULL.pquerna2007-06-081-0/+2
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr-util/trunk@545426 13f79535-47bb-0310-9956-ffa450edef68
* Make the hash calculation function used for server selection a plugable part ↵pquerna2007-06-081-8/+22
| | | | | | of the API, allowing end users to use something other than our non-standard CRC. git-svn-id: http://svn.apache.org/repos/asf/apr/apr-util/trunk@545425 13f79535-47bb-0310-9956-ffa450edef68
* Add additional stats fields to apr_memcache, added to memcached in version ↵pquerna2007-06-081-0/+11
| | | | | | | | | | 1.2.2+ PR: 42329 Submitted By: Josh Rotenberg <joshrotenberg gmail.com> git-svn-id: http://svn.apache.org/repos/asf/apr/apr-util/trunk@545404 13f79535-47bb-0310-9956-ffa450edef68
* Update license headers.jerenkrantz2007-01-151-8/+6
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr-util/trunk@496440 13f79535-47bb-0310-9956-ffa450edef68
* Remove the active server from the pollset before returning it's socket to ↵pquerna2006-12-021-1/+1
| | | | | | the resource list, preventing any race conditions. git-svn-id: http://svn.apache.org/repos/asf/apr/apr-util/trunk@481516 13f79535-47bb-0310-9956-ffa450edef68
* Reset the socket to blocking mode after connect() finishes.pquerna2006-12-021-0/+5
| | | | | | | | | | | | | | | This fixes some issues with both larger writes, and larger multi-gets, where the connection would timeout, even though everything is working fine. A better solution would be to write a socket_writev_full(), to ensure the usage of timeouts effectively, but the reality of memcached is that if you can connect, your request will always be serviced, unless the memcached instance went away at exactly that moment. git-svn-id: http://svn.apache.org/repos/asf/apr/apr-util/trunk@481513 13f79535-47bb-0310-9956-ffa450edef68
* Fix some warnings.rooneg2006-10-101-3/+9
| | | | | | | | | | Pointed out by: jorton * memcache/apr_memcache.c (apr_memcache_multgetp): Fix type punned pointer warnings. git-svn-id: http://svn.apache.org/repos/asf/apr/apr-util/trunk@454830 13f79535-47bb-0310-9956-ffa450edef68
* Use the apr'ized (APR_MAX_IOVEC_SIZE) version of IOV_MAX rather than the ↵bnicholes2006-08-231-2/+2
| | | | | | platform version since this #define is not cross-platform. git-svn-id: http://svn.apache.org/repos/asf/apr/apr-util/trunk@434080 13f79535-47bb-0310-9956-ffa450edef68
* Replace C++ style comments. No functional changes.pquerna2006-08-051-11/+12
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr-util/trunk@428934 13f79535-47bb-0310-9956-ffa450edef68
* Add memcache multi-get support to apr_memcache.pquerna2006-08-051-0/+341
| | | | | | | | | | | | | | | | | | | * include/apr_memcache.h Add _value_t structure for holding an individual value from memcached. Add new functions: apr_memcache_add_multget_key, apr_memcache_multgetp. * memcache/apr_memcache.c: Add a local baton structure for associating severs to queries. Add new functions: apr_memcache_add_multget_key, mget_conn_result, apr_memcache_multgetp Submitted By: Rob Emanuele <rob.emanuele ask.com> Paul Querna <paul.querna ask.com> git-svn-id: http://svn.apache.org/repos/asf/apr/apr-util/trunk@428931 13f79535-47bb-0310-9956-ffa450edef68
* When destructing a connection in the reslist, send "quit" to the memcache ↵pquerna2006-08-031-1/+18
| | | | | | node, to be nice about closing the socket. git-svn-id: http://svn.apache.org/repos/asf/apr/apr-util/trunk@428526 13f79535-47bb-0310-9956-ffa450edef68
* When there is any kind of error in the creation of the socket or the initial ↵pquerna2006-08-031-2/+8
| | | | | | connection, make sure we destroy our subpool, instead of just leaking resources into the parent pool. This fixes a socket fd leak if the memcache node you are connecting to is not online. git-svn-id: http://svn.apache.org/repos/asf/apr/apr-util/trunk@428521 13f79535-47bb-0310-9956-ffa450edef68
* * memcache/apr_memcache.c (get_server_line): Remove unreachable codejorton2006-05-241-6/+1
| | | | | | | (found by Coverity). git-svn-id: http://svn.apache.org/repos/asf/apr/apr-util/trunk@409101 13f79535-47bb-0310-9956-ffa450edef68
* Set the connection timeout, before we try to connect, otherwise we use the ↵pquerna2005-11-301-2/+2
| | | | | | default timeout, which is too long for memcached. git-svn-id: http://svn.apache.org/repos/asf/apr/apr-util/trunk@349992 13f79535-47bb-0310-9956-ffa450edef68
* In a non-threaded environment (like FreeBSD-4.x), make apr-util compile.martin2005-10-311-0/+10
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr-util/trunk@329770 13f79535-47bb-0310-9956-ffa450edef68
* Use apr_size_t for referencing data lengths.pquerna2005-10-281-7/+8
| | | | | | | Suggested By: Joe Orton git-svn-id: http://svn.apache.org/repos/asf/apr/apr-util/trunk@329142 13f79535-47bb-0310-9956-ffa450edef68
* Use apr_size_t instead of apr_uint32_t in several places.pquerna2005-10-281-2/+2
| | | | | | | Suggested By: Joe Orton git-svn-id: http://svn.apache.org/repos/asf/apr/apr-util/trunk@329139 13f79535-47bb-0310-9956-ffa450edef68
* More style fixes to make it closer to the official APR Style. No functional ↵pquerna2005-10-281-11/+11
| | | | | | changes. git-svn-id: http://svn.apache.org/repos/asf/apr/apr-util/trunk@329138 13f79535-47bb-0310-9956-ffa450edef68
* Fix style of several if's. No functional changes. Noticed by Joe Orton.pquerna2005-10-281-6/+8
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr-util/trunk@329136 13f79535-47bb-0310-9956-ffa450edef68
* Replace sprintf with apr_snprintf as noticed by Joe Orton. pquerna2005-10-281-3/+3
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr-util/trunk@329135 13f79535-47bb-0310-9956-ffa450edef68
* Import apr_memcache trunk to APR-Util.pquerna2005-10-281-0/+1225
Still TODO: - Move CRC32 to a separate public function/API. - Create a multi-get interface. - Make locking and connection pooling optional. git-svn-id: http://svn.apache.org/repos/asf/apr/apr-util/trunk@329089 13f79535-47bb-0310-9956-ffa450edef68