summaryrefslogtreecommitdiffstats
path: root/ctdb/lib/tdb
Commit message (Collapse)AuthorAgeFilesLines
...
* Port from SAMBA tdb: commit a91bcbccf8a2243dac57cacec6fdfc9907580f69 Author: ↵Rusty Russell2009-08-041-0/+5
| | | | | | | | Jim McDonough <jmcd@samba.org> Date: Thu May 21 16:26:26 2009 -0400 Detect tight loop in tdb_find() (This used to be ctdb commit 5253a0ba3a34fbf5810f363ecc094203d49e835f)
* Port from SAMBA tdb: commit 42c0931441ef53a3f977e1334355fa83f05ac184 Author: ↵Rusty Russell2009-08-041-1/+0
| | | | | | | | Tim Prouty <tprouty@samba.org> Date: Tue Mar 31 16:24:07 2009 -0700 tdb: Remove unused variable (This used to be ctdb commit aa22d1875b1997664af983c0baeabe34e40dd253)
* Port from SAMBA tdb:Rusty Russell2009-08-043-52/+133
| | | | | | | | | | | | | | | | 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)
* New attempt at TDB transaction nesting allow/disallow.Ronnie Sahlberg2009-05-252-1/+14
| | | | | | | | | | 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)
* Revert "add TDB_NO_NESTING. When this flag is set tdb will not allow any ↵Ronnie Sahlberg2009-05-252-15/+4
| | | | | | | | 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)
* add TDB_NO_NESTING. When this flag is set tdb will not allow any nested ↵Ronnie Sahlberg2009-04-262-4/+15
| | | | | | transactions and tdb_transaction_start() will implicitely _cancel() any pending transactions before starting any new ones. (This used to be ctdb commit 459e4ee135bd1cd24c15e5325906eb4ecfd550ec)
* second try for safe transaction stores into persistend tdb databasesRonnie Sahlberg2008-05-221-1/+1
| | | | | | for stores into persistent databases, ALWAYS use a lockwait child take out the lock for the record and never the daemon itself. (This used to be ctdb commit 7fb6cf549de1b5e9ac5a3e4483c7591850ea2464)
* dont emit the can not start transaction with locks held at all.Ronnie Sahlberg2008-05-211-1/+1
| | | | | | it just pollutes the logs (This used to be ctdb commit c66e44d44f8d1142394ce5c6a68ac09fd67211fe)
* lower the debug level for the "can not start transaction" since we do expect ↵Ronnie Sahlberg2008-05-211-1/+1
| | | | | | | | this to happen a few times inside ctdb (since we cant really block and wait for all locks to dissapear before we can write the header, for example when doing a dmaster miration) in those cases we accept that we couldnt get a transaction and then just writes the data "unsafely" anyway. (This used to be ctdb commit 56af7df33456bf10d19b97cb005257720ac0b610)
* carefully step around the recovery area when doing a tdb_wipe_all. This preventsAndrew Tridgell2008-02-081-33/+47
| | | | | | problems with wipe_all on databases that may need crash recovery (This used to be ctdb commit e7b1349bf8784c151c2651edd99b3f40ebcece1f)
* fixed a problem with tdb growing after each recoveryAndrew Tridgell2008-02-071-0/+43
| | | | (This used to be ctdb commit d754380961e67271809fed6c44f45356fe7a9c77)
* fixed a crash bug in the new transaction codeAndrew Tridgell2008-01-311-0/+3
| | | | (This used to be ctdb commit 0d298e863c8ab2945fd329661c09ec6889152326)
* merge from samba4Andrew Tridgell2008-01-188-53/+18
| | | | (This used to be ctdb commit 21245b894b32f232251fd7c0e2fbfd073fb10514)
* more efficient freelist allocationAndrew Tridgell2008-01-182-43/+43
| | | | | | | | | This takes advantage of the fact that we can do left merges but not right merges By allocating data from the end of the freelist entry rather than the beginning we can guarantee that if we immediately free the record again it will be merged with the previous freelist entry, reducing fragmentation (This used to be ctdb commit 6d159f2c115dd5e9b8bab8798f7ac710b4427593)
* minor fix to transaction_write_existingAndrew Tridgell2008-01-151-16/+6
| | | | (This used to be ctdb commit aa4e7578f78449c518730811220666e5e34adc06)
* fixed the bug that caused tdbtorture to failAndrew Tridgell2008-01-143-0/+123
| | | | | | It was an error in the new transaction code (This used to be ctdb commit 27f0dfdfb93d92859de3cbbd3874cfb38c13a169)
* tdb_freelist_size was reporting 1 more than correct sizeAndrew Tridgell2008-01-101-2/+1
| | | | (This used to be ctdb commit 46214c9234c574b45bce0b88bfb3af437415a69e)
* a compromise for freelist scanning - we now will look for other than the ↵Andrew Tridgell2008-01-091-1/+16
| | | | | | first fit, but get exponentially more desperate as we get deeper into the freelist (This used to be ctdb commit f3319ef84c47dc8bf0bfb4ef1c72cee58ed9d88c)
* added two new ctdb commands:Andrew Tridgell2008-01-082-0/+24
| | | | | | | | | | 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)
* - added tdb_add_flags() and tdb_remove_flags()Andrew Tridgell2008-01-064-3/+17
| | | | | | | | - make freelist merging more paranoid - fixed TDB_DATA_STAART() (broken by earlier commit) (This used to be ctdb commit c3be8eb7d1ca316111ec51f45dbca2fa5609cf93)
* merge from Samba4Andrew Tridgell2008-01-0516-79/+229
| | | | (This used to be ctdb commit 9aed7a1d065272c2e5b54872228a73f37664b526)
* convert tdb from u32 to uint32_t to match the current Samba treesAndrew Tridgell2008-01-057-49/+45
| | | | (This used to be ctdb commit 0dc754b7e8b0985a252885ed043949dfb7ea1ae1)
* Rewrote the tdb transaction code to be O(N) instead of O(N^2)Andrew Tridgell2008-01-051-184/+181
| | | | | | | | | | | | | The previous transaction code was fast as long as you didn't do too many writes within the transaction. The new code is a bit slower for very small numbers of writes, but scales linearly as the number of writes increases. The old code scaled as O(N^2) with the number of writes, making it unusable for large N. After testing, this needs to be merged into the Samba version of tdb, along with many of the other recent tdb changes in the ctdb tree. (This used to be ctdb commit bef8fe3d3ba80c7c660972c5357407f5278f7e26)
* fixed data offset definitionAndrew Tridgell2008-01-051-1/+1
| | | | (This used to be ctdb commit cef83d74883f6c66866fb7e5e17769322a3473da)
* cleanup the new freelist codeAndrew Tridgell2008-01-051-29/+24
| | | | (This used to be ctdb commit 76137104c7028b061578950d4b6b35ca8267fab1)
* added tdb_wipe_all() functionAndrew Tridgell2008-01-051-1/+55
| | | | (This used to be ctdb commit 8e2d81cf54630970d66af92de2c0333acd2e1d22)
* avoid write locks during delete checks in traversalsAndrew Tridgell2008-01-053-1/+5
| | | | (This used to be ctdb commit dde9f3f0061988a0cdf10ee9e4db982c1b79ad1a)
* expand tdb by minimum of 25% at a timeAndrew Tridgell2008-01-051-5/+7
| | | | (This used to be ctdb commit 355575878e2b6e85268ca8387f41a19bcd9db651)
* prevent O(n^2) behaviour for traverse after large numbers of deletesAndrew Tridgell2008-01-041-0/+23
| | | | (This used to be ctdb commit e3c60552366f1d8d464c43efbcd6ed5a2a1adb71)
* quick fix for timeout in recoveryAndrew Tridgell2008-01-022-8/+3
| | | | (This used to be ctdb commit 9205c681a819782d061bb41637191c130e91b100)
* make sure we set close on exec on any possibly inherited fdsAndrew Tridgell2007-09-191-0/+5
| | | | (This used to be ctdb commit d9dec82076f14a348e7b67b4350180681ff86f32)
* update lib/tdb from samba4Andrew Tridgell2007-07-1018-35/+18
| | | | (This used to be ctdb commit 96a39ccee38bcfd64d614fe4670766e59ef246b6)
* update lib/replace from samba4Andrew Tridgell2007-07-1019-25/+22
| | | | (This used to be ctdb commit f0555484105668c01c21f56322992e752e831109)
* - merged ctdb_store test from ronnieAndrew Tridgell2007-06-171-0/+7
| | | | | | | - added DatabaseHashSize tunable - added logging of events inside recovery (for timing) (This used to be ctdb commit 3593cdb928b91e217faf1b3c537fa28dc82cdace)
* global lock should imply the transaction lockAndrew Tridgell2007-05-224-14/+47
| | | | (This used to be ctdb commit 765a7e27344476ea8835565839b69872ea6ab6f0)
* added _mark calls for tdb_lockallAndrew Tridgell2007-05-122-2/+26
| | | | (This used to be ctdb commit e59134fd2af67c746b907c23fdcde2eccbbe17cf)
* added nonblocking varients of the two lockall functions to tdbAndrew Tridgell2007-05-102-5/+23
| | | | (This used to be ctdb commit 2e99fa41ce01fa282bc0f3244ca42a78173743ed)
* merge relevant lib code from samba4Andrew Tridgell2007-05-052-3/+3
| | | | (This used to be ctdb commit 8076a7c7e12da6d59bae31a2e4a0267d87c7b1b3)
* added tdb_chainlock_mark() call, which can be used to mark a chain locked ↵Andrew Tridgell2007-05-052-3/+30
| | | | | | 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)
* added seqnum propogation code to ctdbAndrew Tridgell2007-05-042-6/+20
| | | | (This used to be ctdb commit be2572b1b09eaaa1ea6a726d60f16996f9407d13)
* added a tdb_enable_seqnum() functionAndrew Tridgell2007-05-042-0/+9
| | | | (This used to be ctdb commit 1f89da231c6637e339d5da156d6a48340706fe61)
* merge latest versions of lib/replace, lib/talloc, lib/tdb and lib/events ↵Andrew Tridgell2007-05-024-14/+20
| | | | | | into ctdb bzr tree (This used to be ctdb commit eaea8a9fa8d2f5e08f3af619fa1008a663f39053)
* merge from samba4Andrew Tridgell2007-04-212-3/+3
| | | | (This used to be ctdb commit a64c6ace26559b2793f2a804430fb0fc53f03a34)
* merge tdb updates from samba4Andrew Tridgell2007-04-215-22/+234
| | | | (This used to be ctdb commit c9959e5741a17fd52070b744714eb00bf92a93eb)
* added a tdb_chainlock_nonblock() call to tdbAndrew Tridgell2007-04-162-4/+30
| | | | (This used to be ctdb commit 6587bdca71d97709c9271a73aea0be5a2a35f399)
* merge local copy of tdb from samba4 tdbAndrew Tridgell2007-04-1615-361/+763
| | | | (This used to be ctdb commit d4619ce98ce44acaebeb6ae9c516a7917bf4e27f)
* added rest of tdb (missed in earlier commit)Andrew Tridgell2007-02-2011-0/+3860
| | | | (This used to be ctdb commit 4c1434cc4613fc94958de0aa882bf7ca41ec8458)
* added copies of libs so can be built standaloneAndrew Tridgell2007-01-2523-0/+6352
(This used to be ctdb commit 0bf6e6cb371bb946ea8cc1d8c7a23a41ea715832)