mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
76e1024f4c
We can't just free it, because has the GUID index list as a child, and
these are shared by the new dn list (from the subtransaction we are
committing). But if the dn list is long and the main transaction is
long-lived, we can save a lot of memory by turning this dn list into
an almost empty node in the talloc tree. This returns us to roughly
the situation we had prior to the last commit.
For example, with the repro.sh script on bug 15590 in indexes mode
with 10000 rules, The last 3 commits use this much memory at the end
of an unusually large transaction:
full talloc report on 'struct ldb_context' (total 4012222 bytes in 90058 blocks)
full talloc report on 'struct ldb_context' (total 2405482219 bytes in 90058 blocks)
full talloc report on 'struct ldb_context' (total 4282195 bytes in 90058 blocks)
That is, the last commit increased usage 500 fold, and this commit
brings it back to normal.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15590
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit
|
||
---|---|---|
.. | ||
ABI | ||
common | ||
docs | ||
examples | ||
include | ||
ldb_key_value | ||
ldb_ldap | ||
ldb_ldb | ||
ldb_map | ||
ldb_mdb | ||
ldb_sqlite3 | ||
ldb_tdb | ||
man | ||
modules | ||
nssldb | ||
tests | ||
tools | ||
web | ||
_ldb_text.py | ||
configure | ||
Doxyfile | ||
examples.dox | ||
ldb.pc.in | ||
mainpage.dox | ||
Makefile | ||
pyldb_util.c | ||
pyldb-util.pc.in | ||
pyldb.c | ||
pyldb.h | ||
README_gcov.txt | ||
wscript |