summaryrefslogtreecommitdiff
path: root/source4/lib/tdb
AgeCommit message (Collapse)AuthorFilesLines
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-10r12498: Eliminate INIT_OBJ_FILES and ADD_OBJ_FILES. We were not usingJelmer Vernooij1-3/+2
the difference between these at all, and in the future the fact that INIT_OBJ_FILES include smb_build.h will be sufficient to have recompiles at the right time. (This used to be commit b24f2583edee38abafa58578d8b5c4b43e517def)
2007-10-10r12254: Add some (hopefully correct) descriptions for libraries that are ↵Jelmer Vernooij1-0/+1
installed. Install pkg-config files. (This used to be commit a86abe84e2cae7c6188c094a92c6b62aace02fdf)
2007-10-10r11567: Ldb API change patch.Simo Sorce1-9/+48
This patch changes the way lsb_search is called and the meaning of the returned integer. The last argument of ldb_search is changed from struct ldb_message to struct ldb_result which contains a pointer to a struct ldb_message list and a count of the number of messages. The return is not the count of messages anymore but instead it is an ldb error value. I tryed to keep the patch as tiny as possible bu as you can guess I had to change a good amount of places. I also tried to double check all my changes being sure that the calling functions would still behave as before. But this patch is big enough that I fear some bug may have been introduced anyway even if it passes the test suite. So if you are currently working on any file being touched please give it a deep look and blame me for any error. Simo. (This used to be commit 22c8c97e6fb466b41859e090e959d7f1134be780)
2007-10-10r11304: Add support back in for loading shared modules (not used yet)Jelmer Vernooij1-5/+0
(This used to be commit 90f49b6f70c4aaf0e4ab4fad2e6f9caeb0f6f3a6)
2007-10-10r11303: Support defining and installing public headers for libraries.Jelmer Vernooij1-0/+1
Support installing libraries. Get rid of pkg-config file (will be autogenerated later on). (This used to be commit b4745032a2c55752c527026feb221ccc3dce10c8)
2007-10-10r11300: Treat libraries as a special kind of subsystemJelmer Vernooij1-13/+4
(one that can also be built as a library and installed). (This used to be commit 98d1f9b1dc523ed88c5aa8d066030b33d74f62bf)
2007-10-10r11244: Relative path names in .mk filesJelmer Vernooij1-8/+8
(This used to be commit 24e10300906c380919d2d631bfb3b8fd6b3f54ba)
2007-10-10r11214: Remove scons files (see ↵Jelmer Vernooij1-15/+0
http://lists.samba.org/archive/samba-technical/2005-October/043443.html) (This used to be commit 7fffc5c9178158249be632ac0ca179c13bd1f98f)
2007-10-10r10893: add configure test for utime (needed for the previous utime patch)Andrew Tridgell1-1/+1
(This used to be commit ef020d599fd2336cbf879920fe3505b97783dfc8)
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-10r10586: Add MergedObject() builder. Default to Library() ratherJelmer Vernooij1-1/+1
then StaticLibrary() (This used to be commit b53313dc517986c69a4e4cb8fe3885b696f8faa1)
2007-10-10r10524: SAFE_FREE() in tdb does not need the discard_const_p()Andrew Tridgell1-10/+1
the discard_const_p() was causing problems on openbsd where intptr_t is not defined (This used to be commit f02a92787b179a4070227d87e37b7ac092d9e6eb)
2007-10-10r10522: finally got the locking working on solaris10. This adds a read lock onAndrew Tridgell1-0/+12
the transaction lock in tdb_traverse_read(). This prevents a pattern of locks which triggers the deadlock detection code in solaris10. I suspect solaris10 is trying to prevent lock starvation by granting locks in the order they were requested, which makes it much easier to produce deadlocks. (This used to be commit 54203aacd138c30826d54c5d9b6cc8d6e9e270f8)
2007-10-10r10496: - added configure test for sys/time.hAndrew Tridgell2-3/+3
- print length of failed locks (This used to be commit 11739ad31d7b3e1cf94ebf395608647e341257c4)
2007-10-10r10495: older redhat boxes need sys/time.h for select()Andrew Tridgell1-0/+3
(This used to be commit a11762e7bc139b0280e457e682722d955b81d8e5)
2007-10-10r10494: - don't generate a tdb log message for any type of failed lock probeAndrew Tridgell1-5/+2
- if the lock upgrade loop ever fails then log a warning (This used to be commit 1b03c4e6c7e89452a835ef5ff39c07f58b715a22)
2007-10-10r10493: we need sys/select.h to enable select() in the solaris workaroundAndrew Tridgell2-1/+4
(This used to be commit 144cc3da5eadf0dcb28ef722feeed813c033e08a)
2007-10-10r10492: work around a bug in solaris which cases lock upgrades to fail withAndrew Tridgell3-1/+28
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-10r10484: try to fix the pread/pwrite declaration problemsAndrew Tridgell3-8/+3
(This used to be commit 196995ea38414ce5a57031c4cdf61b3ed548196a)
2007-10-10r10483: fixed some uninitialised variables warningsAndrew Tridgell2-1/+3
(This used to be commit 315653cf1ecc11c435ee35b20e6cf9c73a67fa68)
2007-10-10r10475: make sure we report failures in tdbtorture (ie. get the exit status ↵Andrew Tridgell1-1/+1
right) (This used to be commit a795fc0aa141c08af6e37af07c88164bad3db35b)
2007-10-10r10471: stratos doesn't have getpagesize(), so guess 8k on systems that don'tAndrew Tridgell3-2/+6
have it. Overestimating is harmless. (This used to be commit ab953c8c72060c496876b6f39d388ad2f7e3c7e0)
2007-10-10r10470: solaris8 has a problem with tdbtorture with 3 processes. To see ifAndrew Tridgell1-1/+1
this is just a solaris issue this patch changes the default to 3, and I'll see how many build farm boxes break (This used to be commit c85836bafc9c042deac2a02ef6fddbfeaa5f47f1)
2007-10-10r10469: use the older style of structure initialisation for tdb to make itAndrew Tridgell2-12/+12
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 Tridgell3-23/+49
- more workarounds for aix not handling malloc of size 0 (This used to be commit c2b1739c6389503854f55fa8407c55071781eff4)
2007-10-10r10467: aix doesn't like zero length malloc :(Andrew Tridgell1-0/+5
(This used to be commit 0177c6ca3e9baa223b5f7b29adc12d862dcb19d8)
2007-10-10r10466: work around missing pread/pwrite declaration on openbsdAndrew Tridgell3-0/+23
(This used to be commit e615f36733966f9992670e3650fbe9b20d7d218c)
2007-10-10r10465: separate out a read_only db from a read-only traversal to ensure weAndrew Tridgell6-12/+13
don't end up doing a mmap read only (This used to be commit 294ccfd46a0c4e1af9365d028acdabec03c41ad3)
2007-10-10r10463: consider it an error if tdbtorture produces any log messagesAndrew Tridgell1-1/+10
(This used to be commit d9ee0e8b59ee52ed1e41865cffe97e32b504e7e7)
2007-10-10r10462: cope better with compilers that don't put the object file in the ↵Andrew Tridgell1-0/+4
same directory as the source (This used to be commit 312491b2511039f3d6308e70c849810c35a3259c)
2007-10-10r10461: fixed tdb build on systems without stdint.hAndrew Tridgell1-2/+2
(This used to be commit 83168c7e76c7e3adcdb0eec1611827d4db09f858)
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-10r10459: fixed some portability problemsAndrew Tridgell3-0/+6
(This used to be commit 03942dd54b31e7a4cf9c6270b26ccf68a3234b40)
2007-10-10r10424: for caller convenience, automatically turn a tdb_traverse() into aAndrew Tridgell1-0/+4
tdb_traverse_read() for read only databases (This used to be commit 9b53e04377d2ff652c4a9496798d2e3aa0dccab3)
2007-10-10r10421: following on discussions with simo, I have worked out a way ofAndrew Tridgell10-32/+130
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-10r10420: Two minor scons fixesJelmer Vernooij1-1/+1
(This used to be commit 749b19d34f6105c696a07cc2cd39d5acecfc735b)
2007-10-10r10415: The ldb and tdb libraries are bad examples to test out the make protoTim Potter1-6/+4
code as they are marked as NOPROTO in the config.mk files. (This used to be commit 5f530eacbae073e9df6adde316404f70ecfe9122)
2007-10-10r10410: blindly update the scons file for tdb. I'm not sure how this works,Andrew Tridgell1-1/+1
but it definately needs transaction.c now (This used to be commit fa353a5bc562fa1ace0daf6586c42d1d5698c6e4)
2007-10-10r10405: added transactions into tdb, and hook them into ldb. See myAndrew Tridgell17-113/+1323
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-10r10385: removed obsolete commentAndrew Tridgell1-1/+0
(This used to be commit 40a8ad2d1eb26d1635b8f188036b04319ffd41b4)
2007-10-10r10384: add _GNU_SOURCE in tdb configureAndrew Tridgell1-0/+1
(This used to be commit 21e5c328a033a4b452b3fd696069ad8bbfa6b9cc)
2007-10-10r10379: Add files for ldb and tdb to proto_files. The tool for building proto.hTim Potter1-5/+9
is busted though. (This used to be commit 54882f88cad1427b6adcb4c956a63e534e7d13e4)
2007-10-10r10336: Add sconscript for a couple more subsystems.Jelmer Vernooij1-1/+0
(This used to be commit 59d4450453c25f5cce9b67b808ff0c4433c1d194)
2007-10-10r10335: Build tdb tools into bin directory.Tim Potter1-4/+5
(This used to be commit f35c4763d5c681a74af1f59e75a2f93e99d645cb)
2007-10-10r10330: Add SConscript to more subsystems. Some of the tdb tools build now.Jelmer Vernooij2-1/+14
Start on custom Samba scons tools (for handling proto generation, pidl, etc) (This used to be commit 4bffe4435944fffa3f9680b5a2fe63f2bdd98003)
2007-10-10r10258: Fix an unused/duplicate local variable.Tim Potter1-2/+0
(This used to be commit 360be7028c2244391cdd9ed6d156cec8dab9e9e9)
2007-10-10r10253: a fairly large tdb cleanup and re-organise. Nearly all of this changeAndrew Tridgell24-2578/+2231
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-10r9774: r11605@blu: tridge | 2005-08-30 12:02:19 +1000Andrew Tridgell1-0/+3
make sure we don't walk off the end of the hash array (This used to be commit 3c32f24e2c6a99ec294fb16e1684cd22b08f2df4)
2007-10-10r9773: r11599@blu: tridge | 2005-08-30 11:55:57 +1000Andrew Tridgell1-5/+13
optimise this case a bit more. The total speedup using non-indexed ldbtest is now around a factor of 80x. The code is ugly as hell, but I think this speed is worth it. Of course, if we only ever do indexed searches in ldb then this doesn't help, but it seems all too common that we get unindexable searches, so the optimisation is worthwhile (This used to be commit 2e14fb893dd9815cdb2488c630131dc549e5c361)