[prev in list] [next in list] [prev in thread] [next in thread] 

List:       fedora-directory-commits
Subject:    =?utf-8?q?=5B389-commits=5D?= [389-ds-base] 01/01: Ticket 49722 - Errors log full of " WARN - keys2i
From:       git () pagure ! io (git repository hosting)
Date:       2018-05-28 14:12:20
Message-ID: 20180528141219.E29918DA2662 () pagure01 ! fedoraproject ! org
[Download RAW message or body]

This is an automated email from the git hooks/post-receive script.

mreynolds pushed a commit to branch 389-ds-base-1.3.7
in repository 389-ds-base.

commit 7a334ca4966fd63fc5bbcd3ace3502cf8d283ae7
Author: Mark Reynolds <mreynolds@redhat.com>
Date:   Fri May 25 11:30:04 2018 -0400

    Ticket 49722 - Errors log full of " WARN - keys2idl - recieved NULL idl from \
index_read_ext_allids, treating as empty set" messages  
    Description:  If searching on entrydn, and the value is not found return an empty
                  list instead of NULL.  This prevent these harmless error messages \
in  log
    
    https://pagure.io/389-ds-base/issue/49722
    
    Reviewed by: ?
    
    (cherry picked from commit e350a268d6f7cbaaad35187f3774093b140bc42c)
---
 ldap/servers/slapd/back-ldbm/filterindex.c | 2 +-
 ldap/servers/slapd/back-ldbm/index.c       | 5 ++++-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/ldap/servers/slapd/back-ldbm/filterindex.c \
b/ldap/servers/slapd/back-ldbm/filterindex.c index e8c3c20..aaa1d6e 100644
--- a/ldap/servers/slapd/back-ldbm/filterindex.c
+++ b/ldap/servers/slapd/back-ldbm/filterindex.c
@@ -990,7 +990,7 @@ keys2idl(
         }
 #endif
         if (idl2 == NULL) {
-            slapi_log_err(SLAPI_LOG_WARNING, "keys2idl", "recieved NULL idl from \
index_read_ext_allids, treating as empty set\n"); +            \
slapi_log_err(SLAPI_LOG_WARNING, "keys2idl", "received NULL idl from \
                index_read_ext_allids, treating as empty set\n");
             slapi_log_err(SLAPI_LOG_WARNING, "keys2idl", "this is probably a bug \
that should be reported\n");  idl2 = idl_alloc(0);
         }
diff --git a/ldap/servers/slapd/back-ldbm/index.c \
b/ldap/servers/slapd/back-ldbm/index.c index 7e1cdd0..222f64d 100644
--- a/ldap/servers/slapd/back-ldbm/index.c
+++ b/ldap/servers/slapd/back-ldbm/index.c
@@ -966,7 +966,10 @@ index_read_ext_allids(
         slapi_sdn_init_dn_byval(&sdn, val->bv_val);
         rc = entryrdn_index_read(be, &sdn, &id, txn);
         slapi_sdn_done(&sdn);
-        if (rc) { /* failure */
+        if (rc == DB_NOTFOUND) {
+            /* return an empty list */
+            return idl_alloc(0);
+        } else if (rc) { /* failure */
             return NULL;
         } else { /* success */
             rc = idl_append_extend(&idl, id);

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.
_______________________________________________
389-commits mailing list -- 389-commits@lists.fedoraproject.org
To unsubscribe send an email to 389-commits-leave@lists.fedoraproject.org
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/389-commits@lists.fedoraproject.org/message/2RX6I6TO2SQFIOKLQB5XHO7D34W4GJKW/



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic