mirror of
https://github.com/samba-team/samba.git
synced 2025-02-09 09:57:48 +03:00
The call to tdb_repack() inside tdb_transaction_commit() is an optimization, not part of the transaction itself, so failing due to lock or other errors isn't a fatal error that should cause the caller to think the transaction was a failure by returning -1. The tdb transaction itself has finished and been committed onto stable storage via fsync and all locks released at the point tdb_repack() is called. tdb_repack() is only called here as it's a convenient point to attempt to reduce tdb fragmentation without having to add a timer call to repack in all users of tdb. This causes lock ordering issues in Samba, showing up as: ldb: ltdb: tdb(../private/sam.ldb.d/DC=SAMBA2008R2,DC=EXAMPLE,DC=COM.ldb): tdb_transaction_prepare_commit: failed to upgrade hash locks: Locking error This is because Samba has multiple tdb databases open, and the lock order between them is important. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13952 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
compression - Various compression algorithms (MSZIP, lzxpress) popt - Command-line option parsing library replace - Provides replacements for standard (POSIX, C99) functions not provided by the host platform. subunit - Utilities and bindings for working with the Subunit test result reporting protocol. talloc - Hierarchical pool based memory allocator tdb - Simple but fast key/value database library, supporting multiple writers torture - Simple unit testing helper library