| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is based on Ronnie's work, merged with mine. That means
errors are all my fault.
Differences from Ronnie's:
1) use syslog's LOG_ levels directly.
2) typesafe arg to log function, and use it (eg stderr) in helper function.
3) store fn in ctdb context, and expose ctdb_log_level directly thru API.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(This used to be ctdb commit 86259aa395555aaf7b2fae7326caa2ea62961092)
|
|
|
|
|
|
|
|
| |
This is going to help for logging, since we want it there.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(This used to be ctdb commit 0786152472bc43efae4c896f7c6c07c6e080b9b2)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make the use of ctdb_release_lock() mandatory from the callback.
Split ctdb_release_lock() in two, release the tdb lock in the
ctdb_release_lock() function and move the freeing of the lock structure to ctdb_free_lock() which is private to libctdb.
When the callback returns, verify that the callback has actually released the lock and warn (FIXME) if not.
Update ctdb_writerecord to warn and fail (FIXME) if writing while the lock is not held.
(This used to be ctdb commit 87dc18a3a051da04685f14529c53c428d37c2912)
|
|
|
|
|
|
|
|
|
|
|
| |
and psss it through the callback via private_data.
add a comment that the callback may sometimes have already been invoked
when the ctdb_readrecordlock_async() call returns
and that the application can use *private_data IF the application
needs to know if the callback has already triggered or not.
(This used to be ctdb commit 0ba458a91ba510215a9c8770286a68e19911515f)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After discussion with Ronnie, we decided to revisit this interface. We use
the name ctdb_readrecordlock_async, as it is *not* always a send, and we
use a specific callback to avoid the "fake request" creation on the fast
path.
The request itself is never exposed: this means it can't be cancelled,
but we can revisit that later if need be.
This makes both use and implementation simpler.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(This used to be ctdb commit 03b5546ae45a60ab41eb4f7159a45bfdbf959888)
|
|
|
|
|
|
|
|
|
| |
When attachdb failed, we were handing the db, not the user-supplied
arg to the callback.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(This used to be ctdb commit 8626b6d7d4e5c747b6bac9d5e5b2cd302b6e144c)
|
|
|
|
|
|
| |
print the current time and not the start time
(This used to be ctdb commit d42ea3b1892f6a4abd1dbcf822d0a4d5db422d38)
|
|
|
|
|
|
|
|
|
| |
here and set it to 0 when creating a control to keep valgrind happy.
PDUs are padded to 8 byte boundary. If padding is used, memset it to 0
to keep valgrind happy.
(This used to be ctdb commit 8818d5c483558c0faa6a3923ed5e675fdcfc13af)
|
|
|
|
|
|
| |
change all calls to new_ctdb_request() to use the offset macro to calculate the correct size (instead of allocating one byte too many and hoping the alignment padding saves us.)
(This used to be ctdb commit 07b395258ab08218e8eed3b4a52654925b85275c)
|
|
|
|
|
|
| |
instead of implicit
(This used to be ctdb commit 573e4e2d2bd09dd9579150cce926de774a0b609c)
|
|
|
|
| |
(This used to be ctdb commit 2b3904d3113737d57ac0ec78f33ad163ed7f623c)
|
|
|
|
|
|
| |
and print the time startistics was taken and for how long the statistics have been collected to the "ctdb statistics" output.
(This used to be ctdb commit 1bdfe0cd3370a335b960ce1ef97eade93b0cd2fa)
|
|
|
|
|
|
|
|
| |
using libctdb
update the function "control_pnn()" to use libctdb to ask the daemon for the pnn
(This used to be ctdb commit 3f651eb8d71c7af0268460bc4b1476112140b290)
|
|
|
|
| |
(This used to be ctdb commit 01c2acdf3cb29bb44c74d9d792cf1d3706534ad2)
|
|
|
|
| |
(This used to be ctdb commit 112d252b2ab614eeac38e4a1658cd1e85f6eb829)
|
|
|
|
|
|
| |
to avoid conflict with the function of the same name in libctdb
(This used to be ctdb commit 636ed76d04c8c499a911eb0d72d54b71b0a73d31)
|
|
|
|
|
|
| |
of the same name used in libctdb
(This used to be ctdb commit 49e23f8329649e4d9eefab47c9b158fcc7210d07)
|
|
|
|
|
|
| |
to avoid a colission with the function of the same name in libctdb
(This used to be ctdb commit 41dbdd4fc0ab560420fb0e24a3179ff7c94c5bb7)
|
|
|
|
|
|
| |
with the function of the same name in libctdb
(This used to be ctdb commit ac3292c12832484a22715f1d46aa23f3b7c8a6f6)
|
|
|
|
|
|
|
|
| |
This makes it easier to ensure we catch all places
when we rename old api functions due to colissions with
functions in libctdb
(This used to be ctdb commit d643240783d4847591c5f72ee4d65e5daf1dbcf7)
|
|
|
|
|
|
|
| |
use the headers from /usr/include
and add a comment about how to compile it
(This used to be ctdb commit c0f38e0936c487b63964fd9cef7a9370f227275f)
|
|
|
|
|
|
| |
add this file to the install/rpm
(This used to be ctdb commit 96f186240a17386de1e02eb3af392d97bb55a1ae)
|
|
|
|
|
|
| |
so ensure that the next takover_ip call will fall through to accept the ip and add it.
(This used to be ctdb commit 2d60f96680d16c2992e2a35517822f88c12538b7)
|
|
|
|
|
|
| |
issues with the physical layer
(This used to be ctdb commit d938b80a1c409a9ec4b554ddca5b0d949be53d9e)
|
|
|
|
|
|
|
|
| |
This address is dedicated for outgoing connections.
BZ62613
(This used to be ctdb commit f0e48dd833a4408449083148c172c2136b934e5b)
|
|
|
|
| |
(This used to be ctdb commit 53df35aff1e10201a38931bbb82fb266a38892c0)
|
|
|
|
|
|
| |
based on rustys patch for bz62783
(This used to be ctdb commit bdd250b9afdd1060cfd1e2b0f0a5a567150bb380)
|
|
|
|
| |
(This used to be ctdb commit 3587df065669972a631ba08918df37536c9cb633)
|
|
|
|
| |
(This used to be ctdb commit 93f1622cd4106fb1a2acbe643cbb2b3dc9fd0103)
|
|
|
|
| |
(This used to be ctdb commit 76acb97ebcfc378e98767113a81e413969917bb1)
|
|\
| |
| |
| | |
(This used to be ctdb commit d41b802250ddc0a89581eb6285edfd66bdc7a78a)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Previously we could hang in poll with the callback pending (since we
fake it): explicitly call it immediately.
Note: I experienced corruption using DLIST_ADD_END (ctdb->pnn was blatted
when adding to the message_handler list). I switched them all to DLIST_ADD,
but maybe I'm using it wrong?
(This used to be ctdb commit 3727165f0d206999d2cfc2800ff8868640868c7c)
|
| |
| |
| |
| |
| |
| |
| |
| | |
This is a bit tricky for those cases where we need to do multiple or
zero I/Os (eg. attachdb and readrecordlock), but works well for the
simple cases.
(This used to be ctdb commit ebe4dd724338c156423cfdcc10a75b68c2084cde)
|
| |
| |
| |
| | |
(This used to be ctdb commit 1c2f08f104cf6b5f97998a3b9a426a4c5dfd4752)
|
| |
| |
| |
| |
| |
| | |
This provides a slightly more comprehensive test of the library.
(This used to be ctdb commit f36e891c00c63d5b9dfbaddacff86d9da72d3bb7)
|
| |
| |
| |
| |
| |
| | |
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(This used to be ctdb commit f02526486680db1473bdf10328e8f62a2590c745)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is a completely standalone library using only ctdb_protocol.h.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Header from folded patch 'libctdb-message-handling.patch':
libctdb: add message handling to libctdb.
Now clients can send and receive ctdb messages.
(This used to be ctdb commit 732cf6ead4aa2fbefc2b81328171f52c8d935341)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
These simplifications mostly came up due to the implementation.
o Rename ctdb_context to ctdb_connection.
We already have a ctdb_context internally in ctdbd; don't confuse them!
o Rename ctdb_handle to struct ctdb_request.
From the user POV it's a request, and it's also useful internally to
avoid implicit cast to/from void *.
o Rename ctdb_db_context to ctdb_db.
o Introduce ctdb_lock.
This provides an explicit "lock object" you get from readrecordlock
and have to hand to those functions which need you to hold a lock.
o status args are "int" not int32_t.
Should this be a bool?
o Remove last traces on generic callback.
Without semi-sync API, this doesn't help anything and loses type safety.
o Remove the semi-async API.
We can add this later, but I think a sync and async API is enough for
our poor users for the moment :)
o Registering a message handler also takes a callback.
This way you can tell if it failed. Not sure if this is overkill, but it's
consistent.
o ctdb_service() takes an revents arg
Strictly not necessary for a nonblocking fd, but nice to know if a
read or write is possible.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(This used to be ctdb commit 86e1f93df856f9627182ed0e18bfcff6866c0954)
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This imports ctdb.h and tst.c from Ronnie's work: it's a separate commit
for now to make the changes obvious.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(This used to be ctdb commit 09f05cbfc883e5aac33d3781b163cde178ece4cf)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
ctdb_protocol.h
ctdb_client.h is the existing internal client interface (which was mainly
in ctdb.h), and ctdb_protocol.h is the information needed for the wire
protocol only.
ctdb.h will be the new, shiny, libctdb API.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(This used to be ctdb commit 4bba6b8cd47b352f98d41f9f06258d5ac3c9adef)
|
| |
| |
| |
| | |
(This used to be ctdb commit e553da6a060c9cd2514bdb888cf0e50d35572b88)
|
| |
| |
| |
| | |
(This used to be ctdb commit d58b575e15015c5ef9493ab3ad3e8657c5787e2c)
|
| |
| |
| |
| |
| |
| | |
so strip off any initial " on the exports line
(This used to be ctdb commit dce2244e8ac6617c335cfcd721c3795071b9f2b2)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
priorities in such a way that
->recovery_mode was set to normal but database priorities leven2 or 3 was still set to frozen.
causing the recovery daemon to fail to detect that a recovery was needed to recover access to the database.
BZ63951
(This used to be ctdb commit 7411b2b577a16f85ad6913e1bfccce7ea260a613)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
and returning an error.
This might not be sufficient if there are several recoveries in a row.
Instead loop as long as it takes for the recovery master to finish the recoveries and re
spond to the ipreallocate call.
Increase the log level of the error message when the recovery master was busy and could
not perform the ipreallocation promptly
BZ61783
(This used to be ctdb commit 8e9fd36e4619b7cc7bb6f7f7416d13e4c00a296a)
|
| |
| |
| |
| | |
(This used to be ctdb commit 66e05500b6e5c8fa5efbcba4447e488dd4232897)
|
| |
| |
| |
| |
| |
| | |
different database.
(This used to be ctdb commit c692b09851fce85b61c8c654faafb49db8cb601b)
|
|\ \
| |/
|/|
| | |
(This used to be ctdb commit 3f0346dc758d3b05ccb86785e7c8a2d5679ff68c)
|
| |
| |
| |
| |
| |
| |
| |
| | |
Thanks to "waKKu" on irc for this improvement.
Michael
(This used to be ctdb commit 81e1483dd0ce2cd091721e456c0c194cc58442f3)
|
| |
| |
| |
| |
| |
| | |
Michael
(This used to be ctdb commit e1a16c23d7dbf011ad220572f1bf081331efa8f8)
|