| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
A long sleep in the unix startup code made backends hit the connection
timeout before the backends were configured.
Make all the proxy tests use the unix socket instead of listening on a
hardcoded port. Proxy code is completely equivalent from the client
standpoint.
This fix should make the whole test suite run a bit faster too.
|
|
|
|
|
|
|
|
| |
uses mocked backend servers so we can test:
- end to end client to backend proxying
- lua API functions
- configuration reload
- various error conditions
|
|
|
|
|
| |
This allows `make test_tls` to reliably pass when running without
parallelism.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
See BUILD for compilation details.
See t/startfile.lua for configuration examples.
(see also https://github.com/memcached/memcached-proxylibs for
extensions, config libraries, more examples)
NOTE: io_uring mode is _not stable_, will crash.
As of this commit it is not recommended to run the proxy in production.
If you are interested please let us know, as we are actively stabilizing
for production use.
|
| |
|
|
|
|
|
|
|
| |
new tests were flaky for slow systems; for some reason writing to the
closet socket would exit prove instead of throw any kind of error.
Instead we check that the child pid actually exits and loop a bit to
avoid the race.
|
|
|
|
|
|
|
| |
heavily influenced by @jefyt's example.
needs: valgrind is silenced, but any way to "fail the test" with
valgrind-died error?
|
|
|
|
|
|
| |
1. configure.ac - Add --disable-unix-socket to disable and define DISABLE_UNIX_SOCKET.
2. memcached.* - Guard all unix socket-related codes with DISABLE_UNIX_SOCKET. Take note of negative checking (#ifndef DISABLE_UNIX_SOCKET instead of #ifdef UNIX_SOCKET). This is just to make sure that current code even without a config file is the default or supports unix socket.
3. t/ - Check first if unix socket is supported before executing some unix socket-related tests.
|
|
|
|
| |
Enables server-side TLS session caching.
|
|
|
|
| |
travis tests are absolutely glacial, causes this to be flaky.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
"-e /path/to/tmpfsmnt/file"
SIGUSR1 for graceful stop
restart requires the same memory limit, slab sizes, and some other
infrequently changed details. Most other options and features can
change between restarts. Binary can be upgraded between restarts.
Restart does some fixup work on start for every item in cache. Can take
over a minute with more than a few hundred million items in cache.
Keep in mind when a cache is down it may be missing invalidations,
updates, and so on.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Loads "username:password\n" tokens (up to 8) out of a supplied authfile.
If enabled, disables binary protocol (though may be able to enable both
if sasl is also used?).
authentication is done via the "set" command. A separate handler is
used to avoid some hot path conditionals and narrow the code
executed in an unauthenticated state.
ie:
set foo 0 0 7\r\n
foo bar\r\n
returns "STORED" on success. Else returns CLIENT_ERROR with some
information.
Any key is accepted: if using a client that doesn't try to authenticate
when connecting to a pool of servers, the authentication set can be
tried with the same key as one that failed to coerce the client to
routing to the correct server. Else an "auth" or similar key would
always go to the same server.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Without this change, I get the following when running the `t/extstore-jbod.t` test:
Undefined subroutine &main::wait_ext_flush called at t/extstore-jbod.t line 42.
t/extstore-jbod.t ...........
Dubious, test returned 29 (wstat 7424, 0x1d00)
No subtests run
After this change:
t/extstore-jbod.t ........... ok
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Most of the work done by Tharanga. Some commits squashed in by
dormando. Also reviewed by dormando.
Tested, working, but experimental implementation of TLS for memcached.
Enable with ./configure --enable-tls
Requires OpenSSL 1.1.0 or better.
See `memcached -h` output for usage.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Just a Bunch Of Devices :P
code exists for routing specific devices to specific buckets
(lowttl/compact/etc), but enabling it requires significant fixes to
compaction algorithm. Thus it is disabled as of this writing.
code cleanups and future work:
- pedantically freeing memory and closing fd's on exit
- unify and flatten the free_bucket code
- defines for free buckets
- page eviction adjustment (force min-free per free bucket)
- fix default calculation for compact_under and drop_under
- might require forcing this value only on default bucket
|
|
|
|
|
| |
./configure --enable-extstore to compile the feature in
specify -o ext_path=/whatever to start.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implement an aggressive version of drop_privileges(). Additionally add
similar initialization function for threads drop_worker_privileges().
This version is similar to Solaris one and prohibits memcached from
making any not approved syscalls. Current list narrows down the allowed
calls to socket sends/recvs, accept, epoll handling, futex (and
dependencies - mmap), getrusage (for stats), and signal / exit
handling.
Any incorrect behaviour will result in EACCES returned. This should be
restricted further to KILL in the future (after more testing).
The feature is only tested for i386 and x86_64. It depends on bpf
filters and seccomp enabled in the kernel. It also requires libsecomp
for abstraction to seccomp filters. All are available since Linux 3.5.
Seccomp filtering can be enabled at compile time with --enable-seccomp.
In case of local customisations which require more rights, memcached
allows disabling drop_privileges() with "-o no_drop_privileges" at
startup.
Tests have to run with "-o relaxed_privileges", since they require
disk access after the tests complete. This adds a few allowed syscalls,
but does not disable the protection system completely.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Tests have randomly failed to start since the beginning of time, due largely
to port assignment. A random local port is tested, then passed onto the daemon
to try. If that port (on 0.0.0.0) becomes used in the meantime, it fails.
Now, tests default to using unix sockets unique to the pid of the test parent.
Some tests still run via the network and have been changed to 127.0.0.1, which
should collide less with normal internet connections. Some tests require that
due to some timing issues that unix sockets seem to create, and others expect
a network in a few cases.
Ran the tests with `PARALLEL=9 make test` on my machine for two hours and they
didn't fail once.
|
| |
|
|
|
|
|
| |
Set T_MEMD_USE_DAEMON="127.0.0.1:11211" or similar to use an
external daemon. In a debugger, verbosely, or whatever.
|
|
|
|
| |
Adds new option -I, accepts bytes, or NNk or NNm.
|
| |
|
|
|
|
|
| |
This solves the problem where certain test failures would cause
indefinite hangs as child processes refused to ever exit.
|
| |
|
| |
|
|
|
|
|
|
| |
<brian@tangent.org>
git-svn-id: http://code.sixapart.com/svn/memcached/trunk/server@701 b0b603af-a30f-0410-a34e-baf09ae79d0b
|
|
|
|
|
|
| |
(Tomash Brechko tomash.brechko@gmail.com)
git-svn-id: http://code.sixapart.com/svn/memcached/trunk/server@641 b0b603af-a30f-0410-a34e-baf09ae79d0b
|
|
|
|
|
|
| |
own..)
git-svn-id: http://code.sixapart.com/svn/memcached/trunk/server@617 b0b603af-a30f-0410-a34e-baf09ae79d0b
|
|
|
|
| |
git-svn-id: http://code.sixapart.com/svn/memcached/trunk/server@563 b0b603af-a30f-0410-a34e-baf09ae79d0b
|
|
|
|
| |
git-svn-id: http://code.sixapart.com/svn/memcached/trunk/server@557 b0b603af-a30f-0410-a34e-baf09ae79d0b
|
|
|
|
| |
git-svn-id: http://code.sixapart.com/svn/memcached/trunk/server@381 b0b603af-a30f-0410-a34e-baf09ae79d0b
|
|
|
|
| |
git-svn-id: http://code.sixapart.com/svn/memcached/trunk/server@376 b0b603af-a30f-0410-a34e-baf09ae79d0b
|
|
|
|
|
|
| |
debug one with asserts
git-svn-id: http://code.sixapart.com/svn/memcached/trunk/server@375 b0b603af-a30f-0410-a34e-baf09ae79d0b
|
|
git-svn-id: http://code.sixapart.com/svn/memcached/trunk/server@370 b0b603af-a30f-0410-a34e-baf09ae79d0b
|