Hi Maximiliano, 

On Sat, Jun 11, 2005 at 11:34:34AM -0300, Maximiliano Curia wrote:
 
> This has not been the case for me, in more than three ocassions, after the
> database was recovered by db4.2_recover the indexes were left in an
> inconsistent state, which meant we experienced weird behaviors, and the cause
> of them was really a pain to find.
> 
> So, please, if don't think that the init script should call slapindex after 
> calling db4.2_recover at least document this possible problem.

That about any program would need to have such a comment. Even with a
journaling filesystem nothing about the data on it. Journaling ensures
that the filesystem itself is intact. You can still end up with a file
containing zero bytes or whatever it the power fails at the wrong point
in time. 

> > Nothing will help you in case of power failure (short of mounting the
> > relevant filesystems read-only) so I suggest to fix the real problem and
> > not the symptoms.
> 
> I don't need to mount my filesytems in readonly to fix the problem.

That's what I was telling you: You need to stop writing to a filesystem
to be safe in case of a power failure. Nothing else will help you. Even
with data journaling (supported in ext3) you are not safe. BDB should
be able to always recover if you are using ext3 and data journaling. I
wouldn't count on it though.

> What do you suggest? Should I stop using berkeley db? If that's the solution I
> suppose the default for the slapd package should be changed as well.

Fixing your power outages is beyond the control of any package. 

> In the last few years great efforts have been made to have more solid 
> systems, 
> that is, we moved from a non journal filesystem to a journal one, we also 
> have data
> journaling as an option, even in user space [1]. So, we need to find a 
> solution
> to this slapd problem as well.
> 
> [1] http://users.auriga.wearlab.de/~alb/libjio/

Nice thing, did not know about that. With application support you could
indeed handle crashes. Still the libjio will need to know when a
transaction is complete. 

Greetings

        Torsten

Attachment: signature.asc
Description: Digital signature

Reply via email to