#48940 DS logs have warning:ancestorid not indexed
Closed: wontfix None Opened 5 years ago by nhosoi.

Reproducer by Endi Sukma Dewata.

It looks like the warning is generated if the VLV is reindexed when the subtree is empty. Here's a way to reproduce the problem without PKI:

1. Create a DS instance:

$ setup-ds.pl --silent --\
        slapd.RootDN="cn=Directory Manager"\

2. Add an entry and a VLV index based on that entry:

$ ldapadd -x -D 'cn=Directory Manager' -W << EOF
dn: ou=test,dc=example,dc=com
objectClass: top
objectClass: organizationalUnit
ou: test

dn: cn=test,cn=userRoot,cn=ldbm database,cn=plugins,cn=config
objectClass: top
objectClass: vlvSearch
cn: test
vlvBase: ou=test,dc=example,dc=com
vlvScope: 1
vlvFilter: (cn=*)

dn: cn=testIndex,cn=test,cn=userRoot,cn=ldbm database,cn=plugins,cn=config
objectClass: top
objectClass: vlvIndex
cn: testIndex
vlvSort: cn
vlvEnabled: 0
vlvUses: 0

3. Stop the instance:

$ systemctl stop dirsrv@instance.service

4. Check ancestorid.db:

$ dbscan -f /var/lib/dirsrv/slapd-instance/db/userRoot/ancestorid.db -r -n
=1                                      9
        2 3 4 5 6 7 8 9 10
=3                                      4
        6 7 8 9

5. Reindex the VLV while the subtree is empty:

$ vlvindex -Z instance -n userRoot -T testIndex
[26/Jul/2016:20:50:47 +0200] - WARNING: Import is running with nsslapd-db-private-import-mem on; No other process is allowed to access the database
[26/Jul/2016:20:50:47 +0200] - check_and_set_import_cache: pagesize: 4096, pages: 495194, procpages: 57641
[26/Jul/2016:20:50:47 +0200] - Import allocates 792308KB import cache.
[26/Jul/2016:20:50:47 +0200] - userRoot: Indexing VLV: testIndex
[26/Jul/2016:20:50:47 +0200] - warning: ancestorid not indexed on 10; possibly, the entry id 10 has no descendants yet.
[26/Jul/2016:20:50:47 +0200] - userRoot: Finished indexing.
[26/Jul/2016:20:50:47 +0200] - All database threads now stopped

Notice that the warning appears for entry #10.

6. Check id2entry.db:

$ dbscan -f /var/lib/dirsrv/slapd-instance/db/userRoot/id2entry.db
id 10
        rdn: ou=test
        objectClass: top
        objectClass: organizationalUnit
        ou: test
        creatorsName: cn=directory manager
        modifiersName: cn=directory manager
        createTimestamp: 20160726184938Z
        modifyTimestamp: 20160726184938Z
        nsUniqueId: a49c0487-536111e6-a99ab685-0e752cad
        parentid: 1
        entryid: 10

Entry #10 is the base of the VLV.

7. Check ancestorid.db again:

$ dbscan -f /var/lib/dirsrv/slapd-instance/db/userRoot/ancestorid.db -r -n
=1                                      9
        2 3 4 5 6 7 8 9 10
=3                                      4
        6 7 8 9

It produces the same output as in step #4.

I could reproduce the issue with the reproducer and verified the warning makes sense (vlvbase ou=test,dc=example,dc=com has no descendants yet) and it is benign.

We are going to lower the log level and make the message cleaner.

Reviewed by William (Thanks!!)

Pushed to master:
0e4a9a6..17dc978 master -> master
commit 17dc978

Metadata Update from @nhosoi:
- Issue assigned to nhosoi
- Issue set to the milestone:

4 years ago

389-ds-base is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in 389-ds-base's github repository.

This issue has been cloned to Github and is available here:
- https://github.com/389ds/389-ds-base/issues/1999

If you want to receive further updates on the issue, please navigate to the github issue
and click on subscribe button.

Thank you for understanding. We apologize for all inconvenience.

Metadata Update from @spichugi:
- Issue close_status updated to: wontfix (was: Fixed)

a year ago

Login to comment on this ticket.