needed to add an index to the retro changelog so that memberof and referint don't do unindexed searches, but it fails to reindex
/usr/sbin/db2index.pl -v -n 'changelog' -D "cn=directory manager" -w secret12 -Z mysync -t cn ldap_initialize( ldap://localhost:1390 ) Successfully added task entry "cn=db2index_2013_12_3_15_3_18, cn=index, cn=tasks, cn=config"
The index thread is created, but waits on a lock:
Thread 2 (Thread 0x7fc88ffff700 (LWP 18992)):
no other activity on the server, indxing an other backend works
I have run into this problem today during syncrepl testing, so changed "Ticket origin" to IPA.
I was unable to reproduce the problem (kind of hang of the task). Using a test case (lib389), it succeeds to index an attribute (here 'cn'). For example:
{{{ dn: cn=db2index_2014_2_7_17_55_14,cn=index,cn=tasks,cn=config objectClass: top objectClass: extensibleObject cn: db2index_2014_2_7_17_55_14 nsinstance: changelog nsindexattribute: cn nstaskcurrentitem: 0 nstasktotalitems: 1 nstasklog:: Y2hhbmdlbG9nOiBJbmRleGluZyBhdHRyaWJ1dGU6IGNuCmNoYW5nZWxvZzogRmluaX NoZWQgaW5kZXhpbmcu nstaskstatus: changelog: Finished indexing. nstaskexitcode: 0 }}}
The problem is possibly not systematic or has been fixed since it was reported. I will continue investigation
attachment ticket47619_test.py
I am still failing to reproduce with the attached test case. The test case does the following: - create 1Master-1Consumer - On master enable: referential integrity, memberof, retro-changelog - Create entries on the replicated suffix - Creates several indexes on the 'cn=changelog' suffix and reindex them with tasks.
All reindex completed successfully, although the index are empty. I fail to reproduce on master, 1.3.1, 1.2.11
Interesting. I don't have the original VM anymore so I will close the ticket.
Thank you for your time!
Hi Peter,
I reproduced locally the problem:
{{{
}}}
Talking with Ludwig yesterday, I realized that the difference of my test case vs. what he did was that the instance was restarted before the reindex. It makes the difference and allow me to reproduce.
I reopen that ticket.
Sorry for the noise
To do a reindex task, the 'changelog' backend needs to be acquired in Write. The hang of the thread processing the task is due to the 'changelog' backend being already acquired in Read.
This seems to be triggered by the retro-changelog plugin startup routine that acquires the backend in Read but does not to release it after the plugin initialization.
{{{ (gdb) where
referral=0x7fffffffb998, errorbuf=0x7fffffffb9b0 "") at ../workspaces/389-master-branch/ds/ldap/servers/slapd/mapping_tree.c:2789
errorbuf=0x7fffffffb9b0 "") at ../workspaces/389-master-branch/ds/ldap/servers/slapd/mapping_tree.c:2214
at ../workspaces/389-master-branch/ds/ldap/servers/plugins/retrocl/retrocl.c:241
at ../workspaces/389-master-branch/ds/ldap/servers/plugins/retrocl/retrocl.c:333
at ../workspaces/389-master-branch/ds/ldap/servers/slapd/plugin.c:1474
at ../workspaces/389-master-branch/ds/ldap/servers/slapd/plugin.c:1442
errmsg=0x7ffff7dbc254 "plugin startup failed\n", operation=212) at ../workspaces/389-master-branch/ds/ldap/servers/slapd/plugin.c:1214
at ../workspaces/389-master-branch/ds/ldap/servers/slapd/plugin.c:1404
What I do not understand is why it requires a restart between index configuration and reindex to trigger the hang.
If the server is not restarted is the index really active, does indexing work and try to acquire the lock ?
Regarding the test case: After enabling the RetroCL plugin, at restart, the backend is not found. So it is not locked (in read), just created. Later restart, will find the backend, that is this time acquired in Read and could trigger this hang.
Regarding the index: I need to check. Indexes are created/used with a restart between 'index' configuratin and reindex. I will check without restart
Regarding index:
Once retroCL is enabled and the server restarted. Indexes are really active as soon as the index entry is created and reindex task complete. It does not require a restart to make active the new indexes
attachment 0001-Ticket-47619-test-case.patch
attachment 0002-Ticket-47619-cannot-reindex-retrochangelog.patch
git merge ticket47619
Updating 5b8dfcd..8087f05 Fast-forward dirsrvtests/tickets/ticket47619_test.py | 299 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ldap/servers/plugins/retrocl/retrocl.c | 3 + 2 files changed, 302 insertions(+) create mode 100644 dirsrvtests/tickets/ticket47619_test.py
git push origin master
Counting objects: 18, done. Delta compression using up to 4 threads. Compressing objects: 100% (10/10), done. Writing objects: 100% (10/10), 4.09 KiB, done. Total 10 (delta 6), reused 0 (delta 0) To ssh://git.fedorahosted.org/git/389/ds.git 5b8dfcd..8087f05 master -> master
commit 8087f058cd9acc304de351412742fd8ceb3ceb48 Author: Thierry bordaz (tbordaz) tbordaz@redhat.com Date: Wed Jan 15 09:59:13 2014 +0100
Pushed to 389-ds-base-1.2.11:
9034668..a5499cb 389-ds-base-1.2.11 -> 389-ds-base-1.2.11 commit a5499cbf60c6b8277f0acffed8763ffe52ae4aff
Metadata Update from @tbordaz: - Issue assigned to tbordaz - Issue set to the milestone: 1.3.3 - 1/14 (January)
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/956
If you want to receive further updates on the issue, please navigate to the github issue and click on subscribe button.
subscribe
Thank you for understanding. We apologize for all inconvenience.
Metadata Update from @spichugi: - Issue close_status updated to: wontfix (was: Fixed)