summaryrefslogtreecommitdiff
path: root/include/apr_memcache.h
diff options
context:
space:
mode:
authorrpluem <rpluem@13f79535-47bb-0310-9956-ffa450edef68>2023-05-09 10:47:07 +0000
committerrpluem <rpluem@13f79535-47bb-0310-9956-ffa450edef68>2023-05-09 10:47:07 +0000
commitabd82d70b93abdb52b8a8800f1042865cddd2d28 (patch)
tree14a54f7bdae63f2561e022eaf86d82434b9ce193 /include/apr_memcache.h
parent1735008a19cfd025ae0e86b2ed14373f82d39969 (diff)
downloadlibapr-util-abd82d70b93abdb52b8a8800f1042865cddd2d28.tar.gz
Merge r582543, r1090093, r1102978, r1909474, r1909585, r1909586, r1909590, r1909677 from trunk:1.7.x
In preparation to be able to test multiple, parallel flavors of the apr build, we'll need to designate the path of the apr-invoked binaires. Macroize this. Removed tabs and trailing spaces. Appears to be required for getpid() In case that we have threads store the apr_reslist parameters in the apr_memcache_server_t struct for later usage. * include/apr_memcache.h::struct apr_memcache_server_t: Add missing fields to struct. * memcache/apr_memcache.c::apr_memcache_server_create: Init fields with given values. Check sockets from connection pool before using them and try to reconnect them if they are not usable any longer. * memcache/apr_memcache.c::ms_find_conn: Check if the socket returned from the connection pool is still readable. If not then invalidate the connection in the pool and request a new one from the connection pool. Repeat this until a valid socket is returned or this was done the maximum number of connections in the pool plus one. This ensures that at least one new socket was created. If a new socket does not work this indicates a broken backend and not just a restart in the past. In this case return an error like previously. * test/testmemcache.c: Add new test for connection validation. * test/memcachedmock.c: For the new test we need a memcached mock server that we control and can restart. * test/testmemcache.h: Shared defines between test/testmemcache.c and test/memcachedmock.c. * test/Makefile.in: * test/Makefile.win: * test/NWGNUmakefile: * test/NWGNUmemcachedmock: Needed changes to build test/memcachedmock.c on different platforms. * Add missing test/memcachedmock.c * Wait for the mock memcached to shutdown the socket * Add CHANGES entry for r1909474, r1909585, r1909586, r1909590 Reviewed by: ruediger git-svn-id: https://svn.apache.org/repos/asf/apr/apr-util/branches/1.7.x@1909699 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include/apr_memcache.h')
-rw-r--r--include/apr_memcache.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/apr_memcache.h b/include/apr_memcache.h
index 82878825..6ffd6622 100644
--- a/include/apr_memcache.h
+++ b/include/apr_memcache.h
@@ -72,6 +72,13 @@ struct apr_memcache_server_t
apr_thread_mutex_t *lock;
#endif
apr_time_t btime;
+#if APR_HAS_THREADS
+ /** Resource list parameters */
+ apr_uint32_t min;
+ apr_uint32_t smax;
+ apr_uint32_t max;
+ apr_uint32_t ttl;
+#endif
};
/* Custom hash callback function prototype, user for server selection.