| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
(This used to be ctdb commit bb3a32ec055432afc7225c9fd7504fb187694bda)
|
|
|
|
|
|
| |
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(This used to be ctdb commit 0f40ea2386892ae10b30beeded0e00edf4c019c3)
|
|
|
|
|
|
|
|
|
| |
tdb_traverse_read() grabs the transaction lock. This can cause ctdbd
(which uses it) to block when it should not; expose mark and normal
variants of this lock, so ctdbd's child (the recovery daemon) can
acquire it and the ctdbd parent can mark it was held.
(This used to be ctdb commit d09fa845bd848d04507853809acf42e0471b44bf)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This flag to tdb_open/tdb_open_ex effects creation of a new database:
1) Uses the Jenkins lookup3 hash instead of the old gdbm hash if none is
specified,
2) Places a non-zero field in header->rwlocks, so older versions of TDB will
refuse to open it.
This means that the caller (ie Samba) can set this flag to safely
change the hash function. Versions of TDB from this one on will either
use the correct hash or refuse to open (if a different hash is specified).
Older TDB versions will see the nonzero rwlocks field and refuse to open
it under any conditions.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(This used to be ctdb commit dd86b24ae5307fe09d4ae22b7070d747013a2b07)
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a better hash than the default: shipping it with tdb makes it easy
for callers to use it as the hash by passing it to tdb_open_ex().
This version taken from CCAN and modified, which took it from
http://www.burtleburtle.net/bob/c/lookup3.c.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(This used to be ctdb commit 58c9d90c758aa7c062d84ab97f62947190526356)
|
|
|
|
|
|
|
|
|
|
|
| |
The Samba tree defines _PUBLIC_ (and _PRIVATE_) for libraries to
control visibility. The last commit absorbed this from their tdb,
but we need to #define to stub it out since ctdb doesn't use it
(and doesn't need to: we only use tdb internally).
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(This used to be ctdb commit 54bee0ec670724c337b882e7dda3e999ffa80691)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We now use -fvisibilty=hidden to hide symbols from outside the tdb
shared library.
This also moved tdb_transaction_recover() into the tdb_private.h
header, as it should never have been a public API. For that reason we
are changing the version number. We're only doing a minor version
increment as it is extremely unlikely that anyone was actually using
tdb_transaction_recover() as its locking requirements were rather
unusual.
Pair-Programmed-With: Rusty Russell <rusty@samba.org>
(Imported from commit 773a8afbba27a5e2e48577100f3ca9873b506615)
(This used to be ctdb commit e174dc084f11db0eb239b643affef2c02c711b1c)
|
|
|
|
|
|
| |
(Imported from commit 261c3b4f1beed820647061bacbee3acccbcbb089)
(This used to be ctdb commit 87ced00d6d98be4a34719af58694e7c940b4dd68)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We need to keep TDB_ALLOW_NESTING as default behavior,
so that existing code continues to work.
However we may change the default together with a major version
number change in future.
metze
(cherry picked from samba commit 3b9f19ed919fef2e88b2f92ae541e07bc7379cd1)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be ctdb commit c1c0ede32dc00ed619d1cf5fda40a9de43995f3a)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ctdb wants a quick way to detect corrupt tdbs; particularly, tdbs with
loops in their hash chains. tdb_check() provides this.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(cherry picked from samba commit 022b4d4aa6861c1e3e6d76484d92555221cb6d14)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be ctdb commit df1a3ce0380fa9d8722b2f9b16f65557095e4c83)
|
|
|
|
|
|
|
|
| |
metze
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be ctdb commit 1d5c5a221c28f1dc652a80ed516a0f18ba588d9f)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It was a regrettable hack which I used to reduce line count in tdb; in fact it caused confusion as can be seen in this patch.
In particular, ecode now needs to be set before TDB_LOG anyway, and having it exposed in
the header is useless (the struct tdb_context isn't defined, so it's doubly useless).
Also, we should never set errno, as io.c was doing.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(cherry picked from samba commit b77f41d58b05101e02d8ac0e54cb0e30807d89c2)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be ctdb commit a6620f6e74aadc708395b21b42303d1082192fcc)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Author: Andrew Tridgell <tridge@samba.org> Date: Tue Dec 16 14:38:17 2008 +1100
imported the tdb_repack() code from CTDB
The tdb_repack() function repacks a TDB so that it has a single
freelist entry. The file doesn't shrink, but it does remove all
freelist fragmentation. This code originated in the CTDB vacuuming
code, but will now be used in ldb to cope with fragmentation from
re-indexing
(This used to be ctdb commit fe3ceb101a5a9c336973c2c6c31406bd8181c2fe)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
commit b90863c0b7b860b006ac49c9396711ff351f777f
Author: Howard Chu <hyc@highlandsun.com>
Date: Tue Mar 31 13:15:54 2009 +1100
Add tdb_transaction_prepare_commit()
Using tdb_transaction_prepare_commit() gives us 2-phase commits. This
allows us to safely commit across multiple tdb databases at once, with
reasonable transaction semantics
Signed-off-by: tridge@samba.org
(This used to be ctdb commit 4c3dac215a088947f645f727343997f5d47e3260)
|
|
|
|
|
|
|
|
|
|
| |
Make the default be that transaction is not allowed and any attempt to create a nested transaction will fail with TDB_ERR_NESTING.
If an application can cope with transaction nesting and the implicit
semantics of tdb_transaction_commit(), it can enable transaction nesting
by using the TDB_ALLOW_NESTING flag.
(This used to be ctdb commit 3e49e41c21eb8c53084aa8cc7fd3557bdd8eb7b6)
|
|
|
|
|
|
|
|
| |
nested transactions and tdb_transaction_start() will implicitely _cancel() any pending transactions before starting any new ones."
This reverts commit 459e4ee135bd1cd24c15e5325906eb4ecfd550ec.
(This used to be ctdb commit f1c6f7dd47bb1081781c0a0d567a92bbbc0aa5d5)
|
|
|
|
|
|
| |
transactions and tdb_transaction_start() will implicitely _cancel() any pending transactions before starting any new ones.
(This used to be ctdb commit 459e4ee135bd1cd24c15e5325906eb4ecfd550ec)
|
|
|
|
| |
(This used to be ctdb commit 21245b894b32f232251fd7c0e2fbfd073fb10514)
|
|
|
|
|
|
| |
It was an error in the new transaction code
(This used to be ctdb commit 27f0dfdfb93d92859de3cbbd3874cfb38c13a169)
|
|
|
|
|
|
|
|
|
|
| |
ctdb vacuum : vacuums all the databases, deleting any zero length
ctdb records
ctdb repack : repacks all the databases, resulting in a perfectly
packed database with no freelist entries
(This used to be ctdb commit 3532119c84ab3247051ed6ba21ba3243ae2f6bf4)
|
|
|
|
|
|
|
|
| |
- make freelist merging more paranoid
- fixed TDB_DATA_STAART() (broken by earlier commit)
(This used to be ctdb commit c3be8eb7d1ca316111ec51f45dbca2fa5609cf93)
|
|
|
|
| |
(This used to be ctdb commit 9aed7a1d065272c2e5b54872228a73f37664b526)
|
|
|
|
| |
(This used to be ctdb commit 96a39ccee38bcfd64d614fe4670766e59ef246b6)
|
|
|
|
| |
(This used to be ctdb commit f0555484105668c01c21f56322992e752e831109)
|
|
|
|
| |
(This used to be ctdb commit e59134fd2af67c746b907c23fdcde2eccbbe17cf)
|
|
|
|
| |
(This used to be ctdb commit 2e99fa41ce01fa282bc0f3244ca42a78173743ed)
|
|
|
|
|
|
| |
without actually locking it. This will be used to guarantee forward progress in the ctdb non-blocking lockwait code
(This used to be ctdb commit 2af98c3418496b39106c7282f550049ec8239657)
|
|
|
|
| |
(This used to be ctdb commit be2572b1b09eaaa1ea6a726d60f16996f9407d13)
|
|
|
|
| |
(This used to be ctdb commit 1f89da231c6637e339d5da156d6a48340706fe61)
|
|
|
|
| |
(This used to be ctdb commit 6587bdca71d97709c9271a73aea0be5a2a35f399)
|
|
|
|
| |
(This used to be ctdb commit d4619ce98ce44acaebeb6ae9c516a7917bf4e27f)
|
|
(This used to be ctdb commit 0bf6e6cb371bb946ea8cc1d8c7a23a41ea715832)
|