Summary: ldapsearch hung at browsing index creation
https://bugzilla.redhat.com/show_bug.cgi?id=171081
This bug was introduced while fixing another bug: deleting a vlv index while it's
being created makes the server crash.
------- Additional Comments From
nhosoi@redhat.comhttps://bugzilla.redhat.com/attachment.cgi?id=202891&action=view)
cvs diff ldif2ldbm.c vlv.c
Files: ldapserver/ldap/servers/slapd/back-ldbm/ldif2ldbm.c
vlv.c
Fix Description:
1. instead of covering all the reindexing loop, set vlv lock just around
vlv_update_index, where vlv update is executed.
2. actually, lock is not meant to use for excluding the operation against vlv
reconfiguration. This ldbm_back_ldbm2index function first calls
instance_set_busy_and_readonly and protects the backend from the operations done
by other threads. vlv delete call was just ignoring the busy/readonly setting.
Thus, changed the vlv code to respect the setting. Found the backend is busy,
deleting a vlv index fails and returns.
3. cleaned up the instance_set_busy_and_readonly function not to leak memory.
4. fixed minor memory leak.
Thanks,
--noriko