1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00
Commit Graph

21 Commits

Author SHA1 Message Date
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
Andrew Tridgell
36cfd2cc64 pull out common command line code for tests into tests/cmdline.c
(This used to be ctdb commit de3db72c1fd0e56ac2b8d8fe962c725dc64f2051)
2007-04-16 14:12:50 +10:00
Ronnie sahlberg
91b7cc8b27 add a beginning of a new test
right now this test only does one fetch lock   but this will be enhanced as more code is added to ctdb to handle fetch_lock and store_unlock

(This used to be ctdb commit 996f117d9181dee22aea979ce04333035f5522c7)
2007-04-12 21:17:10 +10:00
Ronnie sahlberg
4b6fbe7be1 create a standalone ctdb daemon and a script ./direct/ctdbd.sh to start two such daemons in a 2 node cluster.
create a small test application that connects to the ctdb daemon at /tmp/ctdb.socket.127.0.0.1 and do some commands to the daemon.
currently this test tool only opens the socket and registers its pid with the daemon
(the daemon needs to know the pid so that it can forward messages to the correct client)

the test will be extended with additional ctdb commands

(This used to be ctdb commit 801f6127cdd50c5b2d0e64dd8db08500af9dadc9)
2007-04-11 18:54:22 +10:00
Ronnie sahlberg
185cd326da add a test that sends messages between clients connected to the same ctdb
add code to actually pass the messages between clients and ctdb

(This used to be ctdb commit 6d5b55d7b9c611fb5e98765906757a7d82e4bf6b)
2007-04-11 13:43:15 +10:00
Andrew Tridgell
110fe0c5a5 - add --daemon flag to ctdb_fetch test code
- split client specific routines out of ctdb_daemon.c
 - use ctdb_queue code in message send from client to daemon
 - use clearer names in client/daemon functions
 - use talloc autofree context to avoid global for unlink of socket on
   exit
 - start on API change for message handler, to allow ctdb messaging to
   handle daemon mode with multiple clients

(This used to be ctdb commit 53555db45f3583ae4a32cc3aa9e07fb8ef2a77e3)
2007-04-11 11:01:42 +10:00
Ronnie sahlberg
b384019536 dispatcher daemon first try.
does not yet work

(This used to be ctdb commit ff428808c6546d6f2804a1ac1cf414d1bb9cdcb4)
2007-04-09 11:51:27 +10:00
Andrew Tridgell
7074b3c94c put test code in tests/ directory
(This used to be ctdb commit 6dbb36f27dd0f8ac00c7a010108d4fba15753479)
2007-04-07 10:01:09 +10:00
Andrew Tridgell
230c97b04d merge fetch code from ronnie, and add a simple fetch test
(This used to be ctdb commit 83b794befd8d34b3da544a483f9d39a3fa140655)
2007-04-05 13:18:31 +10:00
Peter Somogyi
8b6f1c39e7 Some minor changes before integrating ib...
(This used to be ctdb commit fa39ad5054de6e781ca980b9e24d22fa0c67e9ae)
2007-02-12 16:47:12 +01:00
Andrew Tridgell
26d62554c2 merged ctdb messaging code from samba4
(This used to be ctdb commit af3010562763811deb9b7e37fea9962a42885d9d)
2007-02-09 09:42:04 +11:00
Andrew Tridgell
e1797cf6be added copies of libs so can be built standalone
(This used to be ctdb commit 0bf6e6cb371bb946ea8cc1d8c7a23a41ea715832)
2007-01-25 15:10:40 +11:00
Andrew Tridgell
9a2ca05372 merge from ab
(This used to be ctdb commit 5074b6e84704e213f733cebc92c62ca135f03cd6)
2006-12-20 10:32:31 +11:00
Andrew Tridgell
6dbaa5abfc simple ctdb benchmark
(This used to be ctdb commit eb80fd212472fe3b111dabe7adf6dd507fe3656a)
2006-12-19 16:27:03 +11:00
Alexander Bokovoy
fc2d20e41e Fix cleaning targets to delete proper files
(This used to be ctdb commit 3af84af196e64332fa3ede0689c026b1faa97466)
2006-12-18 17:58:29 +03:00
Peter Somogyi
d323249d2c Made infiniband support configurable.
Adjusted "make distclean" NOT to remove the lib folder (again).
Removed again config.h.in autogenerated file from bzr.

(This used to be ctdb commit 3c264205157c8c2af03bca0051a1fe715c8470e5)
2006-12-15 16:02:45 +01:00
Andrew Tridgell
fcae7fb9ca - added in idtree for efficient reqid handling
- started adding ctdb_call() code

- added ctdb_call_local() implementation

(This used to be ctdb commit 97b1fdf7fa0e230f36add3f1770ecb3a9faee0a1)
2006-11-28 20:48:34 +11:00
Andrew Tridgell
fdb317facf - added simple (fake) vnn system
- split up ctdb layer code into 3 modules

- added a simple test suite

- added packet structures for ctdb_call

- switched to an array for ctdb_node to make vnn lookup easy and fast

(This used to be ctdb commit 8a17460a816a5970f2df8244a06aec55d814f186)
2006-11-28 17:56:10 +11:00
Andrew Tridgell
5b06e73fb1 - split up tcp functions into more logical parts
- added upcall methods from transport to ctdb layer

(This used to be ctdb commit 59f0dab652000f1c755e59567b03cf84dad7e954)
2006-11-28 11:51:33 +11:00
Andrew Tridgell
749a6b4c3a started splitting out transport code
(This used to be ctdb commit 3b75ef65bd0bff9c6366aba5a26b90be509fa77b)
2006-11-27 21:38:13 +11:00
Andrew Tridgell
6613b7d438 initial version
(This used to be ctdb commit 5bba7deef9b03a68d336c138e83d6d4fac35bfce)
2006-11-18 10:41:20 +11:00