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

Re: (ITS#5120) slapadd -q makes database logs unusable



ando@sys-net.it wrote:
> hyc@symas.com wrote:
>> ando@sys-net.it wrote:
>>> When slapadd'ing -q, existing database log files seem to become unusable.  If
>>> this is correct, as it seems to be, slapadd could refuse to start with -q if log
>>> files are present, or, for example, remove the logs if -qq.
>> I guess we could add that check. The docs already say that if an error occurs, 
>> the entire database will be unusable. As such, you should only use it for 
>> initially populating a database, not for adding to an existing one.
> 
> The story is that I placed logs in a separate directory and I forgot to
> clean them up when regenerating the DB after removing the database files :)

Ugh. I don't see how we can reliably detect this case.

In what way do the logs become unusable? I've tried to reproduce this situation 
and see no errors of any kind.

E.g., sh run test001
rm testrun/db.1.a/{alock,*db*}
../servers/slapd/slapadd -q -f testrun/slapd.1.conf -l testdata/test-ordered.ldif
    (the above works fine)
../servers/slapd/slapd -f testrun/slapd.1.conf ...
    (works fine)

db_stat -h testrun/db.1.a -l

(no complaints there either)
-- 
   -- Howard Chu
   Chief Architect, Symas Corp.  http://www.symas.com
   Director, Highland Sun        http://highlandsun.com/hyc/
   Chief Architect, OpenLDAP     http://www.openldap.org/project/