1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00
samba-mirror/lib/ldb
Douglas Bagnall 76e1024f4c ldb:kv_index: realloc away old dn list
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 1bf9ede94f)
2024-10-07 08:33:18 +00:00
..
ABI BUG 15569 ldb: Release LDB 2.9.1 2024-06-19 16:19:36 +02:00
common ldb:attrib_handlers: reduce non-transitive behaviour in ldb_comparison_fold 2024-06-10 13:24:17 +00:00
docs lib:ldb: Reformat shell scripts 2022-02-24 09:15:34 +00:00
examples
include ldb: add NUMERIC_CMP macro to ldb.h 2024-06-10 13:24:16 +00:00
ldb_key_value ldb:kv_index: realloc away old dn list 2024-10-07 08:33:18 +00:00
ldb_ldap ldb_ldap: Fix a memleak 2020-07-02 10:38:34 +00:00
ldb_ldb ldb: Add MDB support to ldb:// 2018-05-23 02:27:12 +02:00
ldb_map ldb: Use correct member of union 2023-04-05 02:10:35 +00:00
ldb_mdb lib:ldb: Fix code spelling 2023-04-11 09:06:35 +00:00
ldb_sqlite3 ldb:ldb_sqlite3: Access correct member of union 2023-08-14 04:57:34 +00:00
ldb_tdb ldb: Fix code spelling 2023-10-25 22:23:37 +00:00
man lib:ldb: Fix code spelling 2023-04-11 09:06:35 +00:00
modules ldb:sort: generalise both-NULL check to equality check 2024-06-10 13:24:16 +00:00
nssldb lib:ldb:nssldb: Fix code spelling 2023-04-04 07:31:36 +00:00
tests ldb: Fix code spelling 2023-10-25 22:23:37 +00:00
tools ldb: Fix building with FORTIFY_SOURCE=2 2023-10-01 22:45:38 +00:00
web
_ldb_text.py ldb/tests/_ldb_text: remove unused imports 2018-10-25 21:45:55 +02:00
configure configure/Makefile: export PYTHONHASHSEED=1 in all 'configure/Makefile' scripts 2022-03-29 22:32:32 +00:00
Doxyfile
examples.dox
ldb.pc.in
mainpage.dox
Makefile Search for location of waf script 2019-02-26 10:39:24 +01:00
pyldb_util.c Use python.h from libreplace 2023-11-20 15:37:33 +00:00
pyldb-util.pc.in lib/ldb: Enable use of a python3 pyldb-util system library 2017-03-10 07:31:10 +01:00
pyldb.c Use python.h from libreplace 2023-11-20 15:37:33 +00:00
pyldb.h pyldb: rename pyldb_Dn_AsDn() to pyldb_Dn_AS_DN() 2019-07-10 04:32:13 +00:00
README_gcov.txt
wscript BUG 15569 ldb: Release LDB 2.9.1 2024-06-19 16:19:36 +02:00