summaryrefslogtreecommitdiff
path: root/source4/lib/tdb/common/transaction.c
AgeCommit message (Collapse)AuthorFilesLines
2007-10-10r22165: merge transaction fix from samba3Andrew Tridgell1-0/+2
(This used to be commit ff78be0be4ef67ed25bfb837bd8a7bf4105367fb)
2007-10-10r22081: transaction_brlock() should be staticAndrew Tridgell1-2/+2
thanks to Ted T'so for pointing this out (This used to be commit 6921f2f7093bbb6c236f16947072026303e58439)
2007-10-10r22041: merge trivial changes from samba3Stefan Metzmacher1-7/+8
metze (This used to be commit 902a76ca705f07c61f86a9ef1346583ba9d3157d)
2007-10-10r21303: As discussed on samba-technical: Change the static array for the ↵Volker Lendecke1-6/+4
in-memory mirrors of the hash chain locks to a dynamically allocated one. Jeremy, I count on you to revert it if the build farm freaks out, it's after midnight here :-) Volker (This used to be commit 7b5db2e472c7e27231fa432d3930789e708abd09)
2007-10-10r19423: merge some tdb changes from SAMBA_3_0 to SAMBA_4_0Andrew Tridgell1-7/+10
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-15/+21
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-10r16774: This patch modifies the tdb API to allow the logging function to be usedAndrew Bartlett1-43/+43
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-10r16043: Fix error messageSimo Sorce1-3/+3
(This used to be commit 2898df2cee22f2d478440e9576bec15140909e45)
2007-10-10r14916: print errno so I can work out why OpenBSD is failing the test for tdbAndrew Tridgell1-1/+2
in the build farm. msync() is failing. (This used to be commit 4c3f3c414135c2b8fa9ea11a156246b56285b84f)
2007-10-10r14799: added a tdb_get_seqnum() call, and the TDB_SEQNUM flag. This allowsAndrew Tridgell1-0/+6
for an extremely lightweight test to see if a tdb has possibly changed. (This used to be commit f325ba605ccceca63712c0f2c98961e35e437b3d)
2007-10-10r13283: added two optimisations to the tdb transactions code. The first is toAndrew Tridgell1-1/+36
more agressively coalesce entries in the linked list of the undo log. The second is to ensure that writes during a transaction into the hash table don't cause the size of the undo log linked list to grow. These optimisations don't affect Samba much, but they make a huge difference to the use of ldb in kde (This used to be commit a37d9434d1fa181fd3d060ad032ee4ec5135fc52)
2007-10-10r10891: I noticed that the secrets.db was not being backed up on my system dueAndrew Tridgell1-0/+9
to msync/mmap not changing the mtime of the file. This patch ensures that for successfully completed transactions we update the mtime. I don't do this on all tdb writes as its too expensive, but doing it just on transactions is bearable, as those cost quite a lot anyway. (This used to be commit b2934732dd62f705f59c124f19460c5436a9a422)
2007-10-10r10492: work around a bug in solaris which cases lock upgrades to fail withAndrew Tridgell1-1/+1
EDEADLK even when progress can be made. This is not a good solution, but I can't find anything better. (This used to be commit 980dd17f7d0a622cd772afc9ba15e50007ad9c6e)
2007-10-10r10483: fixed some uninitialised variables warningsAndrew Tridgell1-1/+1
(This used to be commit 315653cf1ecc11c435ee35b20e6cf9c73a67fa68)
2007-10-10r10469: use the older style of structure initialisation for tdb to make itAndrew Tridgell1-6/+6
more portable. tdb is used in more than just Samba4, and I think the portability/readability balance is a bit different (This used to be commit fc692dc61f06d61cb9126d2a8ccc240cecd11da6)
2007-10-10r10468: - terminate tdbtorture quickly when an error is detectedAndrew Tridgell1-0/+4
- more workarounds for aix not handling malloc of size 0 (This used to be commit c2b1739c6389503854f55fa8407c55071781eff4)
2007-10-10r10465: separate out a read_only db from a read-only traversal to ensure weAndrew Tridgell1-1/+1
don't end up doing a mmap read only (This used to be commit 294ccfd46a0c4e1af9365d028acdabec03c41ad3)
2007-10-10r10460: fixed portability of transaction code to systems with integerAndrew Tridgell1-6/+7
alignment constraints (like sparc) (This used to be commit bce35ad237a55376b6af98416eec92a7c4b422a6)
2007-10-10r10421: following on discussions with simo, I have worked out a way ofAndrew Tridgell1-9/+20
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-0/+976
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)