summaryrefslogtreecommitdiffstats
path: root/lib/tdb/common
Commit message (Collapse)AuthorAgeFilesLines
* overallocate all records by 25%Andrew Tridgell2009-06-011-0/+3
| | | | | | | | This greatly reduces the fragmentation of databases where records tend to grow slowly by a small amount each time. The case where this is most seen is the ldb index records. Adding this overallocation reduced the size of the resulting database by more than 20x when running a test that adds 10k users.
* auto-repack in transactions that expand the tdbAndrew Tridgell2009-06-011-0/+12
| | | | | | The idea behind this is to recover from badly fragmented free lists. Choosing the point where the file expands is fairly arbitrary, but seems to work well.
* make TDB_NOSYNC affect all the fsync/msync calls in transactionsAndrew Tridgell2009-05-281-5/+7
| | | | | | During a transaction commit tdb normally uses fsync/msync calls to make it crash safe. This can be disabled using the TDB_NOSYNC flag, but it wasn't disabling all the code paths that caused a fsync/msync.
* Detect tight loop in tdb_find()Jim McDonough2009-05-211-0/+5
|
* tdb: Remove unused variableTim Prouty2009-03-311-1/+0
|
* Add tdb_transaction_prepare_commit()Howard Chu2009-03-311-52/+124
| | | | | | | | 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
* lib/tdb: if we know pwrite and pread are thread/fork safe tdb_reopen_all() ↵Stefan Metzmacher2009-02-251-0/+5
| | | | | | | | | should be a noop The reason for tdb_reopen_all() is that the seek pointer on fds are shared between parent and child. metze
* imported the tdb_repack() code from CTDBAndrew Tridgell2008-12-161-0/+89
| | | | | | | | 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
* Move common libraries from root to lib/.Jelmer Vernooij2008-09-1711-0/+4679