Andrew Tridgell
aac20642b2
bit less verbose when client exits
...
(This used to be ctdb commit a6477577beba71bd9185b968de43b763378f234b)
2007-04-18 11:33:16 +10:00
Andrew Tridgell
8f059f4d91
- merge volkers debug changes
...
- fixed memory leaks in the 3 packet receive routines. The problem was
that the ctdb_call logic would occasionally complete and free a
incoming packet, which would then be freed again in the packet
receive routine. The solution is to make the packet a child of a
temporary context in the receive routine then free that temporary
context. That allows other routines to keep or free the packet if
they want to, while allowing us to safely free it (via a free of the
temporary context) in the receive function
(This used to be ctdb commit 304aaaa7235febbe97ff9ecb43875b7265ac48cd)
2007-04-18 11:20:24 +10:00
Volker Lendecke
27837c197a
Clean up the call_states correctly
...
(This used to be ctdb commit 9fcc40a2ddd8f7f62bdd8b5ab71d182220e23af0)
2007-04-17 23:40:33 +02:00
Volker Lendecke
ed32ad028c
Be less verbose
...
(This used to be ctdb commit 7497b5a9031c471c25bf6029c436fd82788b415c)
2007-04-17 23:06:10 +02:00
Volker Lendecke
84d276a5be
Some more debug and two memleak fixes
...
(This used to be ctdb commit 1e2802422794956827263265306952df5e69b377)
2007-04-17 23:03:30 +02:00
Volker Lendecke
6c597d3e83
typo
...
(This used to be ctdb commit bf2799504498ae452bb7244ae3eb6a51797afe9b)
2007-04-17 21:23:22 +02:00
Volker Lendecke
3057f683f3
Add timestamps to debug output.
...
(This used to be ctdb commit 197a02384bd2ca42dfff4c0357175424d2321e9c)
2007-04-17 17:59:39 +02:00
Andrew Tridgell
98bb60e9d6
add debug tracing to fetch_lock
...
(This used to be ctdb commit b58d2ae0e4ef3393a93724526f2aebc7529de14f)
2007-04-17 22:39:23 +10:00
Andrew Tridgell
8a7b573320
more DEBUG() calls
...
(This used to be ctdb commit 79f3d63eec5652d87f13875c76e90ead81a26ad9)
2007-04-17 22:27:17 +10:00
Andrew Tridgell
1e2d91c761
moved cmdline.c to common code
...
(This used to be ctdb commit 32b31a6b91a19fc0c5225cb88c35cc1d14b4a6df)
2007-04-17 22:16:50 +10:00
Andrew Tridgell
7758511568
use the common cmdline code in ctdbd
...
add a basic debug system with -dXX
(This used to be ctdb commit af9f21cef79f888c57d3b50a23ca787c9567ce60)
2007-04-17 22:13:06 +10:00
Andrew Tridgell
0d91f8043e
fixed a missing idr remove, and check the types after idr_find()
...
(This used to be ctdb commit 74028de89d18bfedcea17415d6d6dc2f7c69b076)
2007-04-17 20:03:01 +10:00
Andrew Tridgell
fb84d56b1b
make sure we notify ctdb when a node dies
...
(This used to be ctdb commit 598feb4fb9badcf329837965ad39e0f0dfe28498)
2007-04-17 19:41:29 +10:00
Andrew Tridgell
68cf923116
merge from volker and ronnie
...
(This used to be ctdb commit ccc3bef713598f7df6d2e5d83618038d5f25fd68)
2007-04-17 19:27:49 +10:00
Ronnie sahlberg
efd5c4bf83
merge from volker to prevent some valgrind errors
...
(This used to be ctdb commit ab516a6dcc6871cdbf781892adcd2c77e4c631c2)
2007-04-17 18:15:08 +10:00
Ronnie sahlberg
12895896be
merge from tridge
...
(This used to be ctdb commit cf0948e73a10d7bc402a4ade4d9a87a7a247bdba)
2007-04-17 17:38:49 +10:00
Volker Lendecke
748cc9e4b7
ZERO_STRUCT writes one byte too many here.
...
(This used to be ctdb commit 3c5c433e5b92f8fe2193a6e5720e31e3eb6bc76b)
2007-04-17 09:36:53 +02:00
Andrew Tridgell
6fce6e419a
update destination in a redirect reply
...
(This used to be ctdb commit b2836974ad270e823c630e3acf12327b53c37d88)
2007-04-17 17:11:12 +10:00
Andrew Tridgell
5d8bf8e781
stop the client looping (temporary measure)
...
(This used to be ctdb commit 8e6a25f4c4a63145c0dee33453a0693dd395ee68)
2007-04-17 17:10:50 +10:00
Andrew Tridgell
eba2a4b88c
start using ctdb_ltdb_lock_fetch_requeue()
...
(This used to be ctdb commit f89ab3a06b4677f56c92768c3a8ae5ec9f5abbc2)
2007-04-17 16:54:03 +10:00
Ronnie sahlberg
506fa488b9
merge from tridge
...
(This used to be ctdb commit 268a89db5886955e290538fdc08d3e94172e3527)
2007-04-17 16:43:53 +10:00
Andrew Tridgell
1a1aedf78f
when we get a lmaster request, skip updating the header when we are also the new dmaster
...
(This used to be ctdb commit 6c48dcc5df7b855fc8e0774c9572c7b2af618348)
2007-04-17 16:35:28 +10:00
Andrew Tridgell
040e69c1c4
we should not lock in a normal ctdb_call(), as we want them to run concurrently
...
(This used to be ctdb commit f4c8c4b3d4c6fb8f1b8e770d1788816af74a7e1f)
2007-04-17 16:34:53 +10:00
Andrew Tridgell
296b0c2a20
- send the record header from the client to the daemon when doing a
...
fetch, to avoid the daemon re-reading it
- suffix the database name with the node name so that testing on
loopback doesn't result in a name collision in the database open
(This used to be ctdb commit ad30a4db75450643ff146c40faa306a021de3dd2)
2007-04-17 16:20:32 +10:00
Ronnie sahlberg
6a2579cea9
merge from tridge
...
(This used to be ctdb commit c4531b6de9189c3cd80862e29d2dd37aab36b9b4)
2007-04-17 15:35:06 +10:00
Andrew Tridgell
ae6722e845
make sure we unlock
...
(This used to be ctdb commit c09054f878a88129abb6cce24c7bbf53f61a2648)
2007-04-17 15:33:58 +10:00
Andrew Tridgell
b87de399f2
block SIGPIPE in the daemon to prevent a SIGPIPE on write to a dead socket
...
(This used to be ctdb commit 02c09dc07c9bed57ca3692b14e41ac8cca0a29f4)
2007-04-17 15:33:20 +10:00
Andrew Tridgell
5299b7e0e2
now that both daemon and client access the database, it needs to be a real disk file
...
(This used to be ctdb commit 5159f3a61f41bbaf563edd8d901a6bf5bfee4e4e)
2007-04-17 15:32:49 +10:00
Ronnie sahlberg
67a9f54dab
merge from tridge
...
(This used to be ctdb commit e1ea91fa541a21c8164b8bd26b9c77053e8487cb)
2007-04-17 15:02:20 +10:00
Andrew Tridgell
3a3bac80b9
tidyups in test code
...
(This used to be ctdb commit 43061a4cf9b0995ebe6c86e27f7fc3aacb7bb23e)
2007-04-17 15:01:42 +10:00
Andrew Tridgell
6f9b29da22
- removed the non-daemon mode from ctdb, in order to simplify the
...
code. It may be added back later once everything is working nicely,
or simulated using a in-process pipe instead of a unix domain socket
- rewrote the ctdb_fetch_lock() code to follow the new design
(This used to be ctdb commit 5024dd1f305fe1ecc262db2240c56f773b4f28f0)
2007-04-17 14:52:51 +10:00
Andrew Tridgell
29ed9cf5d3
merge from ronnie
...
(This used to be ctdb commit e4ab90e741bfb6b0bb88abb818fe036475cdd0f6)
2007-04-17 12:53:04 +10:00
Ronnie sahlberg
bccf3c7e8e
create symbols for fetch lock response status
...
(This used to be ctdb commit d8243f474897dc65fb7286225b07bdf48b6faed0)
2007-04-17 12:42:52 +10:00
Ronnie sahlberg
11b5345afc
finalize fetch lock changes to get rid of the record handle
...
(This used to be ctdb commit 36c1e98a5533214d5507699dc5d8bdec35cb28c2)
2007-04-17 12:36:31 +10:00
Ronnie sahlberg
e5fff3d611
do not use a ctdb_record_handle for client fetch_lock/store_unlock any more
...
change ctdb_client_fetch_lock to return a status code instead of a record handle and make it unconditionally fill in data.
change ctdb_client_store_unlock to take ctdb_db and key as arguments instead of a record handle
update the ctdb_fetch.c test to use the clientside helpers for fetching and storing data
(This used to be ctdb commit 22d5d40375e0135916c97945646f94119612615d)
2007-04-17 12:22:17 +10:00
Andrew Tridgell
0304eaa779
merge from ronnie
...
(This used to be ctdb commit d854392b04c46bcdd008cced5d16a03d81f97bd0)
2007-04-17 11:54:19 +10:00
Ronnie sahlberg
45660a3c48
remaning code to finish lock_fetch/store_unlock clientside helpers
...
(This used to be ctdb commit edf1e1fea8500461a08cd2795251a5cc0bd10229)
2007-04-17 11:48:27 +10:00
Ronnie sahlberg
481e029768
initial change to remove store_unlock pdu and use tdb chainlock in the client
...
(This used to be ctdb commit 87dd265d2c61125ca2fa922cfcf9371a234fff0c)
2007-04-17 11:34:45 +10:00
Andrew Tridgell
80ec427ec7
merge from ronnie
...
(This used to be ctdb commit fcf3669c27691ddb383d1c585234622efa498d90)
2007-04-17 11:30:19 +10:00
Andrew Tridgell
3c2ebff3cb
partial merge from volker (some overlaps removed)
...
(This used to be ctdb commit c4747460a8e0017acfd2a97a632ecd9395562d4f)
2007-04-17 11:26:59 +10:00
Andrew Tridgell
3fc279760c
better error handling in ctdb_ltdb_lock_fetch_requeue()
...
(This used to be ctdb commit 1952be19f625dbe257050acebf468e7e6eb0da8c)
2007-04-17 11:20:00 +10:00
Ronnie sahlberg
ee9712620f
change some error printouts to make it easier to determine whether the error occured in the client or in the daemon
...
(This used to be ctdb commit a7e42c2c56e38b4b58ede0ad45767695d704dac4)
2007-04-17 10:15:44 +10:00
Ronnie sahlberg
c6fe6d592b
merge from tridge
...
(This used to be ctdb commit 1000ea33025b625e23e7065f95efad447c380c8c)
2007-04-17 09:37:13 +10:00
Andrew Tridgell
71bf837a19
add an explanation of ctdb_ltdb_lock_fetch_requeue()
...
(This used to be ctdb commit 7c749315130a2bc87dcc07460d10dcb089ae4202)
2007-04-17 09:18:20 +10:00
Andrew Tridgell
a024989597
add an explanation of how to use ctdb_lockwait()
...
(This used to be ctdb commit e0c9844ea6270ff506b0b5906aa6ccfcc3bcce7a)
2007-04-17 09:14:52 +10:00
Andrew Tridgell
7db4320e84
fixed crash bug - thanks volker
...
(This used to be ctdb commit e293f6fadf673d8bc7203198d709bcb28c26b482)
2007-04-17 09:10:52 +10:00
Andrew Tridgell
4c787fdff5
darn, forgot this
...
(This used to be ctdb commit 0feb5da60c0331f6c391622910ca1f436263ce46)
2007-04-17 07:41:27 +10:00
Andrew Tridgell
fca41760e3
wait on the right fd ....
...
(This used to be ctdb commit 27b67ee6576b17f8b3aae024ae3bd0bb1c42f0f2)
2007-04-17 00:11:04 +10:00
Andrew Tridgell
8147d033a3
added a ctdb_ltdb_lock_fetch_requeue() function
...
this will be the core of the non-blocking lock idea for ctdb, it will be used
in place of ctdb_ltdb_fetch(), but will also get a lock. It re-starts a request
if it needs to block
(This used to be ctdb commit afa479026cf6293e6a878c8a329cdac035284672)
2007-04-16 23:52:14 +10:00
Andrew Tridgell
7aa68f96f7
added a tdb_chainlock_nonblock() call to tdb
...
(This used to be ctdb commit 6587bdca71d97709c9271a73aea0be5a2a35f399)
2007-04-16 23:03:36 +10:00