[Fedora-directory-devel] Please review: [Bug 469792] vlvindex should not give an error message when the vlvindex is empty

Noriko Hosoi nhosoi at redhat.com
Wed Nov 5 02:51:16 UTC 2008


Summary: vlvindex should not give an error message when the vlvindex is 
empty

https://bugzilla.redhat.com/show_bug.cgi?id=469792

Description of problem:
vlvindex should not give an error message - either its a real error (not sure
why) or the error message is spurious and should not be printed by default 

[error message sample]
$ vlvindex -n userRoot -T "by roomNumber"
[03/Nov/2008:18:16:05 -0800] - userRoot: Indexing VLV: by roomNumber
[03/Nov/2008:18:16:05 -0800] - warning: entrydn not indexed on
'ou=payroll,dc=example,dc=com'
[03/Nov/2008:18:16:05 -0800] - userRoot: WARNING: Failed to fetch subtree
lists: (-30989) DB_NOTFOUND: No matching key/data pair found
[03/Nov/2008:18:16:05 -0800] - userRoot: Possibly the entrydn or ancestorid
index is corrupted or does not exist.
[03/Nov/2008:18:16:05 -0800] - userRoot: Attempting brute-force method instead.
[03/Nov/2008:18:16:05 -0800] - userRoot: Finished indexing.
[03/Nov/2008:18:16:05 -0800] - All database threads now stopped

When ou=payroll, dc=example, dc=com or its descendants do not exist, 
this "Possibly broken or does not exist" message is issued.  This is not 
a false message since it mentions the case the entry does not exist.  
Internally, we could distinguish the broken case from not existing 
case.  Thus, we'd better suppress  unnecessary warnings.   This proposed 
code does so.

[Proposed fix]
Created an attachment (id=322519)
 --> (https://bugzilla.redhat.com/attachment.cgi?id=322519)
cvs diff ldap/servers/slapd/back-ldbm/ldif2ldbm.c

File: ldap/servers/slapd/back-ldbm/ldif2ldbm.c

Fix description: 
In ldbm_fetch_subtrees (ldif2ldbm.c), if the parent entry to be vlvindexed
('ou=payroll,dc=example,dc=com' in this example) does not exist, then vlvindex
with the proposed code issues this warning but no further messages.
  warning: entrydn not indexed on 'ou=payroll,dc=example,dc=com'; 
  entry ou=payroll,dc=example,dc=com may not be added to the database yet.

If the parent entry exists (entry id 10 in this example), but no descendant
entries to be vlvindexed do not, then vlvindex with the proposed code issues
this warning but no further messages.
  warning: ancestorid not indexed on 10; 
  possibly, the entry id 10 has no descendants yet.


The bug 469792 has the test cases and vlvindex output samples.

Thanks,
--noriko
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3237 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://listman.redhat.com/archives/fedora-directory-devel/attachments/20081104/e8dddd2f/attachment.bin>


More information about the Fedora-directory-devel mailing list