[IRCServices] forceload option automatically runs

Andrew Church achurch at achurch.org
Thu May 17 04:59:07 PDT 2007


>Hi, One thing I noticed is that the forceload option could be just added
>into the main code rather then an option.  If services sees corruption in
>the databases it could just automatically load what ever it can understand
>and ignore the rest of the database.  This would also help when restarting
>ircservices as if no one is at the system or needs to restart ircservices
>it could take care of the databases itself rather then needing to login to
>the system and run a binary.  I could see this useful for ircops who don't
>normally have access directly to the system where ircservices is running
>but if they saw a need to restart ircservices they could do so with out
>needing to contact the admin of the server if a database would not load
>and services would not start.

     The problem with this (and the reason -forceload is not the default
in the first place) is that if some part of the database is corrupt,
there's no telling how bad the situation is.  In the worst case, Services
could be unable to load any data, then overwrite your database files with
empty databases, destroying any chance you had of retrieving the data via
other means (such as writing a program to extract the data).

     In any case, -forceload is only supported for the database/version4
module, and there only for certain databases (a corrupt oper.db, for
example, will cause Services to abort whether -forceload is given or not).
Moreover, due to the format of those database files, it's unlikely you'd
be able to recover any data anyway under most circumstances.  I probably
ought to just get rid of the option entirely.

  --Andrew Church
    achurch at achurch.org
    http://achurch.org/