summaryrefslogtreecommitdiff
path: root/lib/ldb/wscript
diff options
context:
space:
mode:
authorGary Lockyer <gary@catalyst.net.nz>2019-04-01 15:27:32 +1300
committerAndrew Bartlett <abartlet@samba.org>2019-04-04 06:40:17 +0000
commit6129a05ca0cc39a8043d58f793c4ec92e4c40182 (patch)
tree7c3ba22599d159436e6afbac7afc3cd4187afe90 /lib/ldb/wscript
parent8f7bf13b96841b38cdc60765a5465be940e1477b (diff)
downloadsamba-6129a05ca0cc39a8043d58f793c4ec92e4c40182.tar.gz
lib ldb key_value: Add get_size method
Add the get_size method to the ldb_key_value layer, this will allow the reindexing code to get an estimate of the number of records in the database. The lmdb backend returns an accurate count of the number of records in the database withe the mdb_env_stat call. The tdb backend does not provide a low cost method to determine the number of records on the database. It does provide a tdb_summary call however this this walks the entire database. So for tdb we use the map size divided by 500, this over estimates the counts for small domains, but the extra memory allocated for the cache should not be significant. Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'lib/ldb/wscript')
-rw-r--r--lib/ldb/wscript2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ldb/wscript b/lib/ldb/wscript
index 0fdd888f533..743dae18357 100644
--- a/lib/ldb/wscript
+++ b/lib/ldb/wscript
@@ -526,7 +526,7 @@ def build(bld):
bld.SAMBA_BINARY('ldb_mdb_kv_ops_test',
source='tests/ldb_kv_ops_test.c',
- cflags='-DTEST_BE=\"mdb\"',
+ cflags='-DTEST_BE=\"mdb\" -DTEST_LMDB=1',
deps='cmocka ldb',
install=False)
else: