/[Apache-SVN]
ViewVC logotype

Revision 1909585


Jump to revision: Previous Next
Author: rpluem
Date: Wed May 3 07:47:15 2023 UTC (11 months, 4 weeks ago)
Changed paths: 9
Log Message:
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.


Changed paths

Path Details
Directoryapr/apr/trunk/memcache/apr_memcache.c modified , text changed
Directoryapr/apr/trunk/test/ modified , props changed
Directoryapr/apr/trunk/test/Makefile.in modified , text changed
Directoryapr/apr/trunk/test/Makefile.win modified , text changed
Directoryapr/apr/trunk/test/NWGNUmakefile modified , text changed
Directoryapr/apr/trunk/test/NWGNUmemcachedmock added
Directoryapr/apr/trunk/test/memcachedmock.c added
Directoryapr/apr/trunk/test/testmemcache.c modified , text changed
Directoryapr/apr/trunk/test/testmemcache.h added

infrastructure at apache.org
ViewVC Help
Powered by ViewVC 1.1.26