summaryrefslogtreecommitdiff
path: root/source4/lib/tdb/common/transaction.c
AgeCommit message (Collapse)AuthorFilesLines
2008-09-16Use single copy of tdb in both samba3 and samba4.Jelmer Vernooij1-1119/+0
2008-09-14The msync manpage reports that msync *must* be called before munmap. Failure ↵Simo Sorce1-1/+1
to do so may result in lost data. Fix an ifdef check, I really think we meant to check HAVE_MMAP here. (cherry picked from commit 74c8575b3f3b90ea21ae6aa7ccd95947838af956) (This used to be commit 8fd54bb55f0c23bd025d1719abcbe75c6a2ea8ac)
2008-01-31merged tdb transaction fixAndrew Tridgell1-0/+3
(This used to be commit eb3af24926977208a8099c848a510704d2ae3524)
2008-01-18merged changes from v3-2-testAndrew Tridgell1-2/+5
(This used to be commit 7077df3e2e3f171532f6a5ac87d45201736c9c11)
2008-01-18merged tdb changes from ctdbAndrew Tridgell1-16/+6
(This used to be commit c54c087a19e36e0522eb4546c9425ae446f0628b)
2008-01-15merged tdb from ctdb bzr treeAndrew Tridgell1-168/+240
(This used to be commit ed0c3a0f74c305b3b8554b05c3f97cf79db8296a)
2007-10-10r24336: Use standard data type uint32_t rather than tdb-specific u32.Jelmer Vernooij1-11/+11
(This used to be commit f90a698387c53508862eb6359bd4d1fba1d2b4b0)
2007-10-10r23798: updated old Temple Place FSF addresses to new URLAndrew Tridgell1-2/+1
(This used to be commit 40c0919aaa9c1b14bbaebb95ecce53eb0380fdbb)
2007-10-10r23795: more v2->v3 conversionAndrew Tridgell1-1/+1
(This used to be commit 84b468b2f8f2dffda89593f816e8bc6a8b6d42ac)
2007-10-10r23238: merged transaction lock changes from ctdbAndrew Tridgell1-5/+4
this ensures that having the global lock also implies the transaction lock (This used to be commit 9dbb2633d7781fcc5d15b175ef36bfda5eb199bb)
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)