summaryrefslogtreecommitdiff
path: root/source4/lib/tdb/include/tdb.h
AgeCommit message (Collapse)AuthorFilesLines
2007-10-10r19425: two more tdb functions from samba3Andrew Tridgell1-0/+2
(This used to be commit c9d9d79c34e8a36a6f684b173b1cc861330adc5c)
2007-10-10r19423: merge some tdb changes from SAMBA_3_0 to SAMBA_4_0Andrew Tridgell1-0/+1
this is in preparation of a merge in the other direction (This used to be commit db3211079fd594aa03c3b9bb3eb6ad86bdd32837)
2007-10-10r19401: make tdb_lockall() much more efficient, and add a tdb_lockall_read()Andrew Tridgell1-1/+3
call which does a read lock on all chains. These will be used to make ldb searches more efficient (This used to be commit de664ec1f8cf179f1d650563272c0de3f7636e2b)
2007-10-10r16916: Implement metze's proposed changes to the tdb logging API.Andrew Bartlett1-3/+7
This clearly links the log function with its private pointer, and makes the argument list for tdb_open_ex a bit shorter. Andrew Bartlett (This used to be commit 5d5503e8d8a10ead3ef21a5ffda52cadb9a07727)
2007-10-10r16774: This patch modifies the tdb API to allow the logging function to be usedAndrew Bartlett1-3/+9
as part of ldb. This allows tdb failures to be passed all the way up to Samba's DEBUG system, which allowed easier debugging. Unfortunately I had to extend the tdb API, as the logging function didn't have a context pointer. I've worked over the 'debug levels' in TDB. Most of them were 0, which didn't seem right, as some were trace-like messages. We didn't see any of these previously, except when accessing TDB directly. Andrew Bartlett (This used to be commit 58898092c1ce043f6d698db5065f372b79109e22)
2007-10-10r15100: Port the bugfix for #3569 to Samba4Volker Lendecke1-1/+1
(This used to be commit 5f1d52f232051324082b840f29dd7719a9328bd5)
2007-10-10r14799: added a tdb_get_seqnum() call, and the TDB_SEQNUM flag. This allowsAndrew Tridgell1-0/+2
for an extremely lightweight test to see if a tdb has possibly changed. (This used to be commit f325ba605ccceca63712c0f2c98961e35e437b3d)
2007-10-10r10421: following on discussions with simo, I have worked out a way ofAndrew Tridgell1-1/+2
allowing searches to proceed while another process is in a transaction, then only upgrading the transaction lock to a write lock on commit. The solution is: - split tdb_traverse() into two calls, called tdb_traverse() and tdb_traverse_read(). The _read() version only gets read locks, and will fail any write operations made in the callback from the traverse. - the normal tdb_traverse() call allows for read or write operations in the callback, but gets the transaction lock, preventing transastions from starting inside the traverse In addition we enforce the following rule that you may not start a transaction within a traverse callback, although you can start a traverse within a transaction With these rules in place I believe all the deadlock possibilities are removed, and we can now allow for searches to happen in parallel with transactions (This used to be commit 7dd31288a701d772e45b1960ac4ce4cc1be782ed)
2007-10-10r10405: added transactions into tdb, and hook them into ldb. See myAndrew Tridgell1-2/+15
samba-technical posting for more details on the transactions design. This also adds a number of command line arguments to tdbtorture, making it more flexible, and fixes some lock deadlock conditions in the tdbtorture code. (This used to be commit 06bd8abba942ec9f1e23f5c5d546cbb71ca3a701)
2007-10-10r10253: a fairly large tdb cleanup and re-organise. Nearly all of this changeAndrew Tridgell1-76/+33
just involves splitting up the core tdb.c code into separate files on logical boundaries, but there are some minor functional changes as well: - move the 'struct tdb_context' into tdb_private.h, hiding it from users. This was done to allow the structure to change without breaking code that uses tdb. - added accessor functions tdb_fd(), tdb_name(), and tdb_log_fn() to access the elements of struct tdb_context that were used by external code but are no longer visible - simplied tdb_append() to use tdb_fetch()/tdb_store(), which is just as good due to the way tdb locks work - changed some of the types (such as tdb_off to tdb_off_t) to make syntax highlighting work better - removed the old optional spinlock code. It was a bad idea. - fixed a bug in tdb_reopen_all() that caused tdbtorture to sometimes fail or report nasty looking errors. This is the only real bug fixed in this commit. Jeremy/Jerry, you might like to pickup this change for Samba3, as that could definately affect smbd in Samba3. The aim of all of these changes is to make the tdb transactions/journaling code I am working on easier to write. I started to write it on top of the existing tdb.c code and it got very messy. Splitting up the code makes it much easier to follow. There are more cleanups we could do in tdb, such as using uint32_t instead of u32 (suggested by metze). I'll leave those for another day. (This used to be commit 4673cdd0d261614e707b72a7a348bb0e7dbb2482)
2007-10-10r5779: Remove signal and timeout gubbage from tdb.Tim Potter1-1/+0
(This used to be commit dbb56e9a59cf00d57b09ded6d60bf9424d5f1f4c)
2007-10-10r5296: - only include the tdb headers where they are neededAndrew Tridgell1-0/+2
- removed the u32 hack in events.c as I think this was only needed as tdb.h defines u32. Metze, can you check that this hack is indeed no longer needed on your suse system? (This used to be commit 6f79432fe656164d4770dbce114a30dda5e7bf9a)
2007-10-10r5143: don't generate prototypes for lib/tdb/Stefan Metzmacher1-0/+2
metze (This used to be commit 1c48c30aaf58d069cdba2f59b5c012bc4bdd3efc)
2007-10-10r2985: got rid of the unused tdb_lockkeys() and tdb_unlockkeys() functionsAndrew Tridgell1-3/+0
they have been broken for 4 years (ever since they were added) and have been never used, which makes them prime candidates for destruction. (This used to be commit 0b53ab85aae4569c04495f07c18a65fd6b47bf4c)
2007-10-10r2493: allow tdb to build standaloneAndrew Tridgell1-0/+4
(This used to be commit 0d5af5b70bd010e7107b18f73a4b899e05c4f025)
2007-10-10r2238: the tdb_debug() function was totally bogus - remove it (you can'tAndrew Tridgell1-3/+1
convert a ... varargs function to a va_list by just a cast!!) also mark the tdb log function with PRINTF_ATTRIBUTE() and fixed some bad format errors in tdb.c that jim found. (This used to be commit c26c92eb8f538748fcbb2ae5a0a8a02bffbbbf86)
2007-10-10r2034: Allow user-selectable hash functions on open only.Jeremy Allison1-1/+4
Jeremy. (This used to be commit b43320ee5c9ac14c330e61ae62e0786b088e04fa)
2007-10-10r848: convert lib/tdb into the same layout as lib/ldbStefan Metzmacher1-0/+153
metze (This used to be commit bacab322ce89979f0ad0811cd15b73d81eceb69d)