1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-07 17:18:11 +03:00
samba-mirror/lib/tdb/test
Andrew Bartlett f80076fe43 tdb: Remove locking from tdb_traverse_read()
This restores the original intent of tdb_traverse_read() in
7dd31288a7

This is needed to avoid a deadlock with tdb_lockall() and the
transaction start, as ldb_tdb should take the allrecord lock during a
search (which calls tdb_traverse), and can otherwise deadlock against
a transaction starting in another process

We add a test to show that a transaction can now start while a read
traverse is in progress

This allows more operations to happen in parallel.  The blocking point
is moved to the prepare commit.

This in turn permits a roughly doubling of unindexed search
performance, because currently ldb_tdb omits to take the lock due to
an unrelated bug, but taking the allrecord lock triggers the
above-mentioned deadlock.

This behaviour was added in 251aaafe3a for
Solaris 10 in 2005. But the run-fcntl-deadlock test works also on Solaris 10,
see https://lists.samba.org/archive/samba-technical/2017-April/119876.html.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2017-07-02 17:35:18 +02:00
..
external-agent.c lib:tdb: Remove use of strcpy in tdb test. 2016-03-22 04:38:24 +01:00
external-agent.h tdb/test: add UNMAP command to external-agent.c 2014-05-22 21:05:15 +02:00
jenkins-be-hash.tdb
jenkins-le-hash.tdb
lock-tracking.c tdb: Enhance lock tracking a bit 2013-02-19 15:46:45 +01:00
lock-tracking.h
logging.c
logging.h
old-nohash-be.tdb
old-nohash-le.tdb
run-3G-file.c tdb: add TDB_MUTEX_LOCKING support 2014-05-22 21:05:15 +02:00
run-allrecord-traverse-deadlock.c tdb: Reproducer for Bug 11381 2015-07-09 00:42:16 +02:00
run-bad-tdb-header.c tdb: add TDB_MUTEX_LOCKING support 2014-05-22 21:05:15 +02:00
run-check.c tdb: add TDB_MUTEX_LOCKING support 2014-05-22 21:05:15 +02:00
run-corrupt.c tdb: add TDB_MUTEX_LOCKING support 2014-05-22 21:05:15 +02:00
run-die-during-transaction.c tdb: add TDB_MUTEX_LOCKING support 2014-05-22 21:05:15 +02:00
run-endian.c tdb: add TDB_MUTEX_LOCKING support 2014-05-22 21:05:15 +02:00
run-fcntl-deadlock.c tdb: add run-fcntl-deadlock test 2017-06-15 01:24:25 +02:00
run-incompatible.c tdb: Fix CID 1034841 Resource leak 2015-03-10 21:48:04 +01:00
run-marklock-deadlock.c tdb/test: add marklock deadlock test 2014-05-22 21:05:15 +02:00
run-mutex1.c tdb/test: add mutex related tests 2014-05-22 21:05:15 +02:00
run-mutex-allrecord-bench.c tdb/test: add mutex related tests 2014-05-22 21:05:15 +02:00
run-mutex-allrecord-block.c tdb/test: add mutex related tests 2014-05-22 21:05:15 +02:00
run-mutex-allrecord-trylock.c tdb/test: add mutex related tests 2014-05-22 21:05:15 +02:00
run-mutex-die.c tdb/test: add mutex related tests 2014-05-22 21:05:15 +02:00
run-mutex-openflags2.c tdb/test: TDB_CLEAR_IF_FIRST | TDB_MUTEX_LOCKING, O_RDONLY is a valid combination 2014-12-02 09:31:08 +01:00
run-mutex-transaction1.c tdb/test: add tdb1-run-mutex-transaction1 test 2014-12-19 09:20:06 +01:00
run-mutex-trylock.c tdb/test: add mutex related tests 2014-05-22 21:05:15 +02:00
run-nested-transactions.c tdb: add TDB_MUTEX_LOCKING support 2014-05-22 21:05:15 +02:00
run-nested-traverse.c tdb: Remove locking from tdb_traverse_read() 2017-07-02 17:35:18 +02:00
run-no-lock-during-traverse.c tdb: add TDB_MUTEX_LOCKING support 2014-05-22 21:05:15 +02:00
run-oldhash.c tdb: add TDB_MUTEX_LOCKING support 2014-05-22 21:05:15 +02:00
run-open-during-transaction.c tdb: Fix CID 1034842 Resource leak 2015-03-11 00:23:20 +01:00
run-rdlock-upgrade.c tdb: Test for readonly lock upgrade bug 2017-04-11 00:33:30 +02:00
run-readonly-check.c tdb: add TDB_MUTEX_LOCKING support 2014-05-22 21:05:15 +02:00
run-rescue-find_entry.c tdb: add TDB_MUTEX_LOCKING support 2014-05-22 21:05:15 +02:00
run-rescue.c tdb: add TDB_MUTEX_LOCKING support 2014-05-22 21:05:15 +02:00
run-rwlock-check.c tdb: add TDB_MUTEX_LOCKING support 2014-05-22 21:05:15 +02:00
run-summary.c tdb: add TDB_MUTEX_LOCKING support 2014-05-22 21:05:15 +02:00
run-transaction-expand.c tdb: add TDB_MUTEX_LOCKING support 2014-05-22 21:05:15 +02:00
run-traverse-in-transaction.c tdb: add TDB_MUTEX_LOCKING support 2014-05-22 21:05:15 +02:00
run-wronghash-fail.c tdb: add TDB_MUTEX_LOCKING support 2014-05-22 21:05:15 +02:00
run-zero-append.c tdb: add TDB_MUTEX_LOCKING support 2014-05-22 21:05:15 +02:00
run.c tdb: add TDB_MUTEX_LOCKING support 2014-05-22 21:05:15 +02:00
rwlock-be.tdb
rwlock-le.tdb
tap-interface.h tdb/test: add a "skip()" macro. 2014-05-22 21:05:14 +02:00
tap-to-subunit.h
tdb.corrupt