1
0
mirror of https://github.com/samba-team/samba.git synced 2025-11-09 20:23:51 +03:00
Commit Graph

8 Commits

Author SHA1 Message Date
Andrew Tridgell
980dd17f7d r10492: work around a bug in solaris which cases lock upgrades to fail with
EDEADLK even when progress can be made. This is not a good solution,
but I can't find anything better.
2007-10-10 13:38:55 -05:00
Andrew Tridgell
315653cf1e r10483: fixed some uninitialised variables warnings 2007-10-10 13:38:53 -05:00
Andrew Tridgell
fc692dc61f r10469: use the older style of structure initialisation for tdb to make it
more portable. tdb is used in more than just Samba4, and I think the
portability/readability balance is a bit different
2007-10-10 13:38:50 -05:00
Andrew Tridgell
c2b1739c63 r10468: - terminate tdbtorture quickly when an error is detected
- more workarounds for aix not handling malloc of size 0
2007-10-10 13:38:50 -05:00
Andrew Tridgell
294ccfd46a r10465: separate out a read_only db from a read-only traversal to ensure we
don't end up doing a mmap read only
2007-10-10 13:38:49 -05:00
Andrew Tridgell
bce35ad237 r10460: fixed portability of transaction code to systems with integer
alignment constraints (like sparc)
2007-10-10 13:38:48 -05:00
Andrew Tridgell
7dd31288a7 r10421: following on discussions with simo, I have worked out a way of
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
2007-10-10 13:38:44 -05:00
Andrew Tridgell
06bd8abba9 r10405: added transactions into tdb, and hook them into ldb. See my
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.
2007-10-10 13:38:41 -05:00