[SCM] Samba Shared Repository - branch v4-8-test updated

Stefan Metzmacher metze at samba.org
Wed Feb 13 16:57:02 UTC 2019


The branch, v4-8-test has been updated
       via  22d5649e895 ldb: Bump ldb version to 1.3.7
       via  d3a9f298f49 ldb: Avoid inefficient one-level searches
      from  9917a7e70ea VERSION: Bump version up to 4.8.10...

https://git.samba.org/?p=samba.git;a=shortlog;h=v4-8-test


- Log -----------------------------------------------------------------
commit 22d5649e895c41875ecbb3403d4b14753e12c1a4
Author: Tim Beale <timbeale at catalyst.net.nz>
Date:   Mon Feb 4 15:37:07 2019 +1300

    ldb: Bump ldb version to 1.3.7
    
    * ldb: Avoid inefficient one-level searches
    * dirsync: Allow arbitrary length cookies
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13686
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13762
    
    Signed-off-by: Tim Beale <timbeale at catalyst.net.nz>
    
    Autobuild-User(v4-8-test): Stefan Metzmacher <metze at samba.org>
    Autobuild-Date(v4-8-test): Wed Feb 13 17:56:32 CET 2019 on sn-devel-144

commit d3a9f298f49b9e9950315007667cb10a3e51ffde
Author: Tim Beale <timbeale at catalyst.net.nz>
Date:   Mon Feb 4 10:49:03 2019 +1300

    ldb: Avoid inefficient one-level searches
    
    Commit 88ae60ed186c9 introduced a problem that made one-level
    searches inefficient if there were a lot of child objects in the same
    level, and the requested object didn't exist. Basically, it ignored the
    case where ldb_kv_index_dn() returned LDB_ERR_NO_SUCH_OBJECT, i.e. the
    indexed lookup was successful, but didn't find a match. At which point,
    there was no more processing we needed to do.
    
    The behaviour after 88ae60ed186c9 was to fall-through and run the
    ldb_kv_index_filter() function over *all* the children. This still
    returned the correct result, but could be costly if there were a lot of
    children.
    
    The case 88ae60ed186c9 was trying to fix was where we could not do
    an indexed search (e.g. trying to match on a 'attribute=*' filter). In
    which case we want to ignore the LDB_ERR_OPERATIONS_ERROR and just run
    ldb_kv_index_filter() over all the children. This is still more
    efficient than the fallback of doing a full database scan.
    
    This patch adds in a short-circuit for the NO_SUCH_OBJECT case, so we
    can skip the unnecessary ldb_kv_index_filter() work.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13762
    
    Signed-off-by: Tim Beale <timbeale at catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    
    (Manual merge of commit 9a893f9613bd6440ab in master)

-----------------------------------------------------------------------

Summary of changes:
 lib/ldb/ABI/{ldb-1.3.0.sigs => ldb-1.3.7.sigs}         |  0
 .../{pyldb-util-1.1.10.sigs => pyldb-util-1.3.7.sigs}  |  0
 ...yldb-util-1.1.10.sigs => pyldb-util.py3-1.3.7.sigs} |  0
 lib/ldb/ldb_tdb/ldb_index.c                            | 18 ++++++++++++++----
 lib/ldb/wscript                                        |  2 +-
 5 files changed, 15 insertions(+), 5 deletions(-)
 copy lib/ldb/ABI/{ldb-1.3.0.sigs => ldb-1.3.7.sigs} (100%)
 copy lib/ldb/ABI/{pyldb-util-1.1.10.sigs => pyldb-util-1.3.7.sigs} (100%)
 copy lib/ldb/ABI/{pyldb-util-1.1.10.sigs => pyldb-util.py3-1.3.7.sigs} (100%)


Changeset truncated at 500 lines:

diff --git a/lib/ldb/ABI/ldb-1.3.0.sigs b/lib/ldb/ABI/ldb-1.3.7.sigs
similarity index 100%
copy from lib/ldb/ABI/ldb-1.3.0.sigs
copy to lib/ldb/ABI/ldb-1.3.7.sigs
diff --git a/lib/ldb/ABI/pyldb-util-1.1.10.sigs b/lib/ldb/ABI/pyldb-util-1.3.7.sigs
similarity index 100%
copy from lib/ldb/ABI/pyldb-util-1.1.10.sigs
copy to lib/ldb/ABI/pyldb-util-1.3.7.sigs
diff --git a/lib/ldb/ABI/pyldb-util-1.1.10.sigs b/lib/ldb/ABI/pyldb-util.py3-1.3.7.sigs
similarity index 100%
copy from lib/ldb/ABI/pyldb-util-1.1.10.sigs
copy to lib/ldb/ABI/pyldb-util.py3-1.3.7.sigs
diff --git a/lib/ldb/ldb_tdb/ldb_index.c b/lib/ldb/ldb_tdb/ldb_index.c
index 429c8f5aa24..f07c9a818c4 100644
--- a/lib/ldb/ldb_tdb/ldb_index.c
+++ b/lib/ldb/ldb_tdb/ldb_index.c
@@ -1835,13 +1835,23 @@ int ltdb_search_indexed(struct ltdb_context *ac, uint32_t *match_count)
 			}
 			/*
 			 * Here we load the index for the tree.
-			 *
-			 * We only care if this is successful, if the
-			 * index can't trim the result list down then
-			 * the ONELEVEL index is still good enough.
 			 */
 			ret = ltdb_index_dn(ac->module, ltdb, ac->tree,
 					    idx_one_tree_list);
+
+			/*
+			 * We can stop if we're sure the object doesn't exist
+			 */
+			if (ret == LDB_ERR_NO_SUCH_OBJECT) {
+				talloc_free(idx_one_tree_list);
+				talloc_free(dn_list);
+				return LDB_ERR_NO_SUCH_OBJECT;
+			}
+
+			/* We only care if this is successful, if the
+			 * index can't trim the result list down then
+			 * the ONELEVEL index is still good enough.
+			 */
 			if (ret == LDB_SUCCESS) {
 				if (!list_intersect(ldb, ltdb,
 						    dn_list,
diff --git a/lib/ldb/wscript b/lib/ldb/wscript
index dfc3d9dce23..e6b3d4f2ced 100644
--- a/lib/ldb/wscript
+++ b/lib/ldb/wscript
@@ -1,7 +1,7 @@
 #!/usr/bin/env python
 
 APPNAME = 'ldb'
-VERSION = '1.3.6'
+VERSION = '1.3.7'
 
 blddir = 'bin'
 


-- 
Samba Shared Repository



More information about the samba-cvs mailing list