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

Re: (ITS#5840) bdb_online_index and shutdown

hyc@symas.com writes:
>ando@sys-net.it wrote:
>>h.b.furuseth@usit.uio.no wrote:
>>> If it knows enough to complain, why not restart the indexing task?
>> There should be an option in doing that.

I don't quite see why.  If you add an index via cn=config, that starts
an indexing task while slapd is running.  A following shutdown-restart
is not necessarily related to a desire to not run that task.

>> In fact, I suspect running slapindex -q can be much more efficient
>> than letting slapd index while serving without index.  (...)

If you shut down slapd because you want to use slapindex, then you know
what you want - so just go ahead and use slapindex.  No extra flag

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 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.