[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: back-bdb online indexing



Pierangelo Masarati wrote:

Given these constraints, is it worthwhile to allow this operation, or
should we just disallow new indexing to be configured at runtime?



Per se I think it is a Good Thing. In relation with operating a DSA, it depends if one can live with the constraints of:

a) do not allow modifications while reindexing
b) do not use the (new) indices until reindexing done

I note that (a) is equivalent to the (current) procedure of stopping
slapd, restarting it in readOnly mode, run slapindex on a copy of the
database, then replace the old with the new, re-indexed database and
restart slapd once more; except that slapd is never stopped, which is the
most significant advantage.  As a consequence, I see an improvement from
the current status; if the constraint can be localized even further, the
improvement could be even greater.

(b) is also equivalent to this, unless it implies that indices cannot be
used entirely.  For example: "cn" is indexed for "exact"; I need to change
it to "exact,substring".  If until it's done I cannot even use "exact",
that's a loss of functionality with respect to the procedure described for
(a).  I don't think this is desirable.

OK, the new back-bdb code appears to work fine. I've tested it while running the test008 clients in a long loop concurrently with the changes, and saw no problems. There is no restriction on modifications, and the old indices are still available while the new values are being set. The only issue here is that old index values are not actually deleted from the disk. Over time I suppose one will need to shutdown the slapd and run slapindex to purge any old index data... Also, if the server has to shutdown before the indexer completes its pass thru the database, then you'll probably need to run slapindex to restore consistency then as well.

--
 -- Howard Chu
 Chief Architect, Symas Corp.       Director, Highland Sun
 http://www.symas.com               http://highlandsun.com/hyc
 Symas: Premier OpenSource Development and Support