[Date Prev][Date Next]
Re: (ITS#5840) bdb_online_index and shutdown
Hallvard B Furuseth wrote:
> email@example.com writes:
> I suppose there could be a flag to _not_ start the indexing task when
> you add an index via cn=config, so you always must slapindex.
I'd rather not.
>> I suppose we should save the last entryID that was indexed at shutdown time,
>> so that the indexer task can resume at the next startup. We'd also need some
>> coordination with slapindex, so that if you ran slapindex after shutdown, it
>> would erase the saved status. Rather than add any fields to the DB index
>> files, it would probably be OK to write the status in the cn=config tree.
> Or a status file in the database directory.
> A cn=config attribute would make it messy to swap database directories
> around, since one must also modify cn=config when doing so.
OK, a status file. It would record the old and new index masks for the
attributes being reindexed, and the entryID where it stopped.
If slapindex is run without a specific list of attributes, (reindex
everything) it should remove and ignore the status file.
If slapindex is run with a specific list of attributes, and those attributes
are in the status file, it should use the saved status and remove the
specified attributes from the status file. (Deleting the file if there are no
other attributes remaining.)
Otherwise, when slapd starts, it should read the status file and resume the
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/