ldb: no need to call del_transaction in ldb_transaction_commit
authorJoe Guo <joeg@catalyst.net.nz>
Tue, 7 Aug 2018 04:45:16 +0000 (16:45 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 15 Aug 2018 05:08:23 +0000 (07:08 +0200)
commitb9e2a2de247add415b4681c93849a9c9ba6f3c4a
tree32537b1fb845c2bf72b49e16792fd300405372be
parent9eccf6a16f5b198181a4fa80b835b1a65b40ed76
ldb: no need to call del_transaction in ldb_transaction_commit

No matter commit succeeded or failed, transation will be delete afterwards.
So there is no need to delete it here.

Aganst Samba this causes an `LDAP error 51 LDAP_BUSY` error when the transaction
fails, say while we try to add users to groups in large amount and
the original error is lost.

In Samba, the rootdse module fails early in the del part of the
start/end/del pattern, and in ldb_tdb and ldb_mdb a failed commit
always ends the transaction, even on failure.

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
lib/ldb/common/ldb.c