1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-28 07:21:54 +03:00
samba-mirror/ctdb/tests
Andrew Tridgell 07ade5e488 this is a demonstration of an idea for handling locks in ctdb.
The problem we have is this:

  - we want the client smbd processes to be able to 'shortcut' access
    to the ltdb, by directly accessing the ltdb, and if the header of
    the record shows we are the dmaster then process immediately, with
    no overhead of talking across the unix domain socket

  - a client doing a shortcut will use tdb_chainlock() to lock the
    record while processing

  - we want the main ctdb daemon to be able to set locks on the
    record, and when those locks collide with a 'shortcut' fcntl lock,
    we want the ctdb daemon to keep processing other operations

  - we don't want to have to send a message from a smbd client to the
    ctdbd each time it releases a lock

The solution is shown in this example. Note that the expensive fork()
and blocking lock is only paid in case of contention, so in the median
case I think this is zero cost.

(This used to be ctdb commit a3248c3e2b740cd2403acffd3c1f6a33dca0ea03)
2007-04-16 16:01:37 +10:00
..
1node.txt - added a 1 node test 2006-12-01 10:23:03 +11:00
4nodes.txt added a 4 node test 2006-12-18 16:05:22 +11:00
bench1.sh merge fetch code from ronnie, and add a simple fetch test 2007-04-05 13:18:31 +10:00
bench-ssh.sh added a benchmark script that launches via ssh 2007-02-20 13:23:01 +11:00
bench.sh add a test that sends messages between clients connected to the same ctdb 2007-04-11 13:43:15 +10:00
cmdline.c pull out common command line code for tests into tests/cmdline.c 2007-04-16 14:12:50 +10:00
cmdline.h pull out common command line code for tests into tests/cmdline.c 2007-04-16 14:12:50 +10:00
ctdb_bench.c pull out common command line code for tests into tests/cmdline.c 2007-04-16 14:12:50 +10:00
ctdb_fetch1.c pull out common command line code for tests into tests/cmdline.c 2007-04-16 14:12:50 +10:00
ctdb_fetch.c pull out common command line code for tests into tests/cmdline.c 2007-04-16 14:12:50 +10:00
ctdb_messaging.c pull out common command line code for tests into tests/cmdline.c 2007-04-16 14:12:50 +10:00
ctdb_test.c pull out common command line code for tests into tests/cmdline.c 2007-04-16 14:12:50 +10:00
fetch1.sh add the two missing file from the previous commit 2007-04-12 21:19:00 +10:00
fetch.sh dont hardcode gdb in the test script. ooops 2007-04-12 16:49:37 +10:00
lockwait.c this is a demonstration of an idea for handling locks in ctdb. 2007-04-16 16:01:37 +10:00
messaging.sh add a test that sends messages between clients connected to the same ctdb 2007-04-11 13:43:15 +10:00
nodes.txt fixed a bunch of memory leaks 2007-04-07 10:45:00 +10:00
test1.sh make normal/deamon mode controllable by a ctdb flag so that the api looks the same in both modes to a client. 2007-04-10 06:03:39 +10:00
test.sh restore the test script that was updated by mistake in the previous checkin 2007-04-10 12:23:10 +10:00